<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" />
</LinearLayout>
</TabHost>
本文介绍了一种使用TabHost实现的Android应用布局方案。通过LinearLayout、FrameLayout和TabWidget组件的组合,可以创建出具备标签页功能的应用界面。该布局允许用户在不同的内容页面间轻松切换。
1266

被折叠的 条评论
为什么被折叠?



