0
由于每个选项卡中的信息可能无法显示,具体取决于屏幕大小,因此我添加了滚动视图。列表视图显示数据库中的信息,但不会在屏幕上传播。它只需要屏幕的一小部分,我只能在这一小部分中滚动。如果我有两组信息,我希望看到两行,但我只看到一行,然后我可以在其中滚动以查看第二组信息。但是,当我删除滚动视图我的列表视图显示它应该是,但其他标签遭受,因为我不能滚动查看其他领域。 下面是我的主要活动:ListView并发症
<TabHost
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/tabHost">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="match_parent"></TabWidget>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/scrollView"
android:fillViewport="true">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<!--Overview Tab Starts-->
<LinearLayout
android:id="@+id/overviewTab"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ListView
android:id="@+id/displayListView"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<!--Overview Tab ends-->
<!--Base Data Tab starts-->
<LinearLayout
android:id="@+id/baseDataTab"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="15dp">
//the needed views go here//
</LinearLayout>
<!--Base Data Tab ends-->
<!--Task Tab starts-->
<LinearLayout
android:id="@+id/taskTab"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="15dp">
//the needed views go here//
</LinearLayout>
<!--Task Tab ends-->
<!--Survey Tab starts-->
<LinearLayout
android:id="@+id/surveyTab"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="15dp">
//the needed views go here//
</LinearLayout>
<!--Survey Tab ends-->
</FrameLayout>
</ScrollView>
</LinearLayout>
</TabHost>
工作像魔术... – 2015-02-06 12:32:11