选项卡(TabHost、TabWidget、FrameLayout)
选项卡由TabHost、TabWidget、FrameLayout 这3个组件构成,用于实现一个多标签页的用户界面,不费话了,先爆图,就知道是什么鬼了,怎么用了。
第一步 配置activity_main.xml
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tools:context=".MainActivity" >
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabWidget
android:id="@android:id/tabs"