android - 制作底部选项卡TabHost
16lz
2021-01-23
最重要的就是FrameLayout的属性android:layout_weight="1" ,只要稍微布局即可、其他的和顶部TabHost一样
<TabHostxmlns:android="http://schemas.android.com/apk/res/android"android:id="@android:id/tabhost"android:layout_width="fill_parent"android:layout_height="fill_parent"><LinearLayoutandroid:orientation="vertical"android:layout_width="fill_parent"android:layout_height="fill_parent"> <!-- android:layout_weight="1" --><FrameLayoutandroid:id="@android:id/tabcontent"android:layout_width="fill_parent"android:layout_height="fill_parent"android:layout_weight="1" /><TabWidgetandroid:id="@android:id/tabs"android:layout_width="fill_parent"android:layout_height="wrap_content" /></LinearLayout></TabHost>
更多相关文章
- Android--取得布局中指定控件的宽高
- android计算器布局(TableLayout)
- android自定义属性 format类型
- Android:configChanges 属性
- Android View类属性及方法
- Android中的visibility属性的区别