2
我有一个片段,其中包含大量的信息(文章)与tabhost在底部与其他文章作为几个listViews。问题是,当我选择标签我scrollView滚动包含列表视图(实际上只是滚动的一切,所以列表视图的第一项是屏幕上的第一件事),我不想要的。TabHost里面的ScrollView将焦点设置为内容和滚动
我需要在ScrollView里面的listViews,因为有很多信息可以显示+额外的相关文章等等,而且布局比屏幕长很多。我解决了scrollview内listview的问题,只是不知道如何禁用 设置焦点在标签点击。
这里是我的布局:
<ScrollView
android:id="@+id/category_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="130dp"
android:src="@drawable/currency_flag_eur" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.24"
android:src="@drawable/currency_flag_eur" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="90dp"
android:layout_weight="0.29"
android:src="@drawable/currency_flag_eur" />
</LinearLayout>
<include layout="@layout/ticker" />
<TabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0" >
<ListView
android:id="@+id/category_top_news"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</ListView>
<ListView
android:id="@+id/category_most_read"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</ListView>
<ListView
android:id="@+id/category_facebook"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</ListView>
</FrameLayout>
</LinearLayout>
</TabHost>
</LinearLayout>
</ScrollView>