Monday, January 27, 2014

[android-developers] Scrollable COntent




I am dynamically creating tabs and there contant but i am not to able scroll the cotent of tabs pls sugges below is my code

TabHost tabHost ;
TabSpec ts1 = tabHost.newTabSpec(value);
TabWidget tabWidget = new TabWidget(frmAudit.this);
tabWidget.setId(android.R.id.tabs);
tabWidget.setBackgroundColor(Color.BLACK);

tabHost.addView(tabWidget, new LinearLayout.LayoutParams
(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); 

FrameLayout frameLayout = new FrameLayout(frmAudit.this);
frameLayout.setId(android.R.id.tabcontent);
frameLayout.setPadding(4, 65, 4, 0);
frameLayout.setMeasureAllChildren(true);
frameLayout.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
//frameLayout.setMinimumHeight(m_nScreenH);
tabHost.addView(frameLayout, new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); 

tabHost.setup(); 
ts1.setIndicator(value);
ts1.setContent(new TabHost.TabContentFactory()
{

TableLayout panel;

public View createTabContent(String tag)
{

EditText ttfUseridComment = new EditText(frmAudit.this);
ttfUseridComment.setPadding(2, 12, 0, 4);
ttfUseridComment.setHeight(84);
ttfUseridComment.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.MATCH_PARENT));
panel.addView(ttfUseridComment);
------------------------->>>>above control needs to scroll

}

}

try
{

tabHost.addTab(ts1);
}

Thanks
RK

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment