У меня есть TabHost с тремя вкладками.Одна из этих вкладок содержит ListActivity.Я хочу, чтобы все три вкладки были с возможностью прокрутки.Сначала я поместил FrameLayout (tabcontent) в ScrollView, но я не могу поместить ListActivity в ScrollView, поэтому я добавил ScrollView для каждой вкладки (кроме третьей с ListActivity).Теперь прокрутка работает только для второй вкладки.Когда я пытаюсь прокрутить сначала, одна полоса прокрутки движется, а контент - нет.Похоже, что только ScrollView, содержащий вторую вкладку, имеет фокус, даже когда я на первой вкладке.
Мой макет:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/black">
<TabHost
android:id="@android: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">
<!-- TAB1 -->
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/tab1Layout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<TextView
anddroid:id="@+id/textview11"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
anddroid:id="@+id/textview12"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
anddroid:id="@+id/textview13"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
anddroid:id="@+id/textview14"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<!-- FEW MORE TEXTVIEWS -->
</LinearLayout>
</ScrollView>
<!-- TAB 2 -->
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/tab2Layout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<TextView
anddroid:id="@+id/textview21"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
anddroid:id="@+id/textview22"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
anddroid:id="@+id/textview23"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
anddroid:id="@+id/textview24"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<!-- FEW MORE TEXTVIEWS -->
</LinearLayout>
</ScrollView>
<!-- TAB3 -->
<!-- ListActivity here -->
</FrameLayout>
</LinearLayout>
</TabHost>
</LinearLayout>