android TabWidget 位置
16lz
2021-12-04
1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="fill_parent" 4 android:layout_height="fill_parent" 5 android:orientation="vertical" > 6 7 <TabHost 8 android:id="@android:id/tabhost" 9 android:layout_width="fill_parent"10 android:layout_height="fill_parent" >11 12 <!-- TabWidget默认置于FrameLayout之上,使用LinearLayout可以将其置于FrameLayout之下。且没加这个LinearLayout,标签和内容页会重叠 -->13 <LinearLayout14 android:layout_width="fill_parent"15 android:layout_height="fill_parent"16 android:gravity="center"17 android:orientation="vertical" >18 19 20 21 <FrameLayout22 android:id="@android:id/tabcontent"23 android:layout_width="fill_parent"24 android:layout_height="wrap_content"25 android:layout_gravity="center_vertical"26 android:layout_weight="1"27 android:gravity="center_vertical" >28 </FrameLayout>29 30 <TabWidget31 android:id="@android:id/tabs"32 android:layout_width="fill_parent"33 android:layout_height="52dip"34 android:layout_weight="0">35 </TabWidget>36 37 38 39 </LinearLayout>40 </TabHost>41 42 43 44 </LinearLayout>
更多相关文章
- android如何调用显示和隐藏系统默认的输入法
- android如何调用显示和隐藏系统默认的输入法
- [轉] android默认debug.keystore的密码
- Android应用模块基本配置元素
- android google map apiKey 相关操作
- 调整Android音量等级及默认音量
- Android(Java):按钮复选框点中效果
- 启动android默认浏览器
- Android默认时区、语言设置