main.xml 包含 tabhost。
现在的问题是横向的 scrollview 不能运行,如果我改变 relative layout 到 linearlayout 标签是可以滚动的,但是却不能在 activity 上看见主要内容,只能看见 tabs。
我也想完全删除 linear layout,包含 tabwidget,但是什么也没有改变。
代码如下:
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:paddingTop="@dimen/tab_space_top"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout android:id="@+id/tab_relative_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<HorizontalScrollView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:scrollbars="none">
<LinearLayout android:id="@+id/tab_linear_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</TabWidget>
</LinearLayout>
</HorizontalScrollView>
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@android:id/tabs">
</FrameLayout>
</RelativeLayout>
</TabHost>
请问如何修改呢?