I'm trying to use a relatively simple Tab view.
All the tabs are declared in the XML, none using alternate Activities.
They appear just fine on screen.
When I click on Tab2, it shows up and Tab1 content is hidden.
Then when I click back on Tab1, it's displayed overlayed with Tab2.
Click back on Tab2, and it's just Tab2 text displaying again.
Both tabs just have a simple ListView of Strings.
I'm obviously doing something wrong here...
<?xml version="1.0" encoding="utf-8"?>
<TabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<RelativeLayout
android:id="@+id/Messages"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:choiceMode="singleChoice"
android:id="@+id/MessageList" />
<RelativeLayout
android:id="@+id/Groups"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:choiceMode="singleChoice"
android:id="@+id/GroupList" />
</RelativeLayout>
</FrameLayout>
</LinearLayout>
</TabHost>
--
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