Hi,
In the Tab2 of TabActivity in the APIDemo example, it has this method
to create a View object for each tab:
public View createTabContent(String tag) {
final TextView tv = new TextView(this);
tv.setText("Content for tab with tag " + tag);
return tv;
}
Can you please tell me how can I create a View for each tab from an
xml layout file?
For example:
public View createTabContent(String tag) {
// load the content from 'tab_content.xml' file
// return a View object
}
// tab content.xml looks something like:
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/button"
android:text="@string/controls_1_save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---