1
我需要有一个布局,其上方有一组标签。我已经得到了标签工作正常,但只要我尝试在他们之外添加一个视图,我留下了该视图,没有可见的选项卡。如何让Android标签与其他视图共存?
这工作得很好:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<LinearLayout ... />
但这并不:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView ... /> <!-- THIS LINE HERE!!! -->
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<LinearLayout ... />
我能做些什么让我的卡口与其他视图共存吗?
为了完整起见,我的活动扩展了TabActivity。
是的,那是我的目标。 – 2010-08-04 10:38:42