0
我需要在Android設備中開發此佈局,即時通訊在設計中使用TabView和三個選項卡。 TabWidget需要在屏幕的底部,我也需要一種方法來爲tabwidget開發這種佈局。實現Android自定義Tabbar
我需要在Android設備中開發此佈局,即時通訊在設計中使用TabView和三個選項卡。 TabWidget需要在屏幕的底部,我也需要一種方法來爲tabwidget開發這種佈局。實現Android自定義Tabbar
剛剛嘗試了這種方式來獲得TabWidget
在屏幕的底部:
<?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" /> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center|center" android:tabStripEnabled="false"/> </LinearLayout>