Note that there are some explanatory texts on larger screens.

plurals
  1. POTabHost with tabs inside scrollviews - scrolling works only for one tab
    primarykey
    data
    text
    <p>I have TabHost with three tabs. One of these tabs contains ListActivity. I want all three tabs to be scrollable. At first I put FrameLayout(tabcontent) inside ScrollView but I can't put ListActivity inside ScrollView so I added ScrollView for each tab(except the third one with ListActivity). Now scrolling works only for second tab. When I am trying to scroll first one scrollbar is moving but content isn't. It looks like only ScrollView containing second tab has focus even when I am on first tab.</p> <p>My layout:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;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"&gt; &lt;TabHost android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp"&gt; &lt;TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;!-- TAB1 --&gt; &lt;ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;LinearLayout android:id="@+id/tab1Layout" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp"&gt; &lt;TextView anddroid:id="@+id/textview11" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;TextView anddroid:id="@+id/textview12" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;TextView anddroid:id="@+id/textview13" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;TextView anddroid:id="@+id/textview14" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;!-- FEW MORE TEXTVIEWS --&gt; &lt;/LinearLayout&gt; &lt;/ScrollView&gt; &lt;!-- TAB 2 --&gt; &lt;ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;LinearLayout android:id="@+id/tab2Layout" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp"&gt; &lt;TextView anddroid:id="@+id/textview21" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;TextView anddroid:id="@+id/textview22" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;TextView anddroid:id="@+id/textview23" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;TextView anddroid:id="@+id/textview24" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;!-- FEW MORE TEXTVIEWS --&gt; &lt;/LinearLayout&gt; &lt;/ScrollView&gt; &lt;!-- TAB3 --&gt; &lt;!-- ListActivity here --&gt; &lt;/FrameLayout&gt; &lt;/LinearLayout&gt; &lt;/TabHost&gt; &lt;/LinearLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload