我在底部有自定義TabWidgets的TabActivity。我希望能夠添加5個以上的選項卡。不像MenuBar,它動態地添加了一個「更多」按鈕,Tabs只是調整大小,看起來非常可怕。所以我第一次嘗試將我的TabWidgets封裝到HorizontalScrollView中。問題是,我有一個ListView作爲TabContent,它的最後一項似乎隱藏在我的TabWidgets後面。 這是我的TabView的在TabWidged「搶斷」空間上的HorizonatalScrollView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_linlay_parent"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/main_tablinear"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_above="@android:id/tabs"/>
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:scrollbars="none"
android:layout_alignParentBottom="true">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"/>
</HorizontalScrollView>
</RelativeLayout>
</TabHost>
</LinearLayout>
我做錯了什麼,我佈局的佈局?有更好的方法來應用4個以上的標籤嗎?雖然我可以看到4個Tabs與我的Nexus-S很好,但我認爲他們在Wildfire上已經很難看了。任何想法讚賞
如果添加4個以上的選項卡,它是否只開始滾動?我有5個選項卡,它仍然擠壓... –