如何解决如何在Android的显示底部设置标签?
| 我想在显示屏的中央底部设置一个标签。解决方法
您可以执行以下操作:
<TabWidget
android:id=\"@android:id/tabs\"
android:layout_width=\"fill_parent\"
android:layout_height=\"wrap_content\"
android:layout_alignBottom = \"@android:id/tabcontent\"
android:paddingLeft =\"50dip\"
/>
谢谢!!
, 对于TabWidget使用layout_weight = \“ 0 \”,对于内容使用layout_weight = \“ 1 \”
<?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:orientation=\"vertical\"
android:layout_width=\"fill_parent\"
android:layout_height=\"fill_parent\">
<FrameLayout
android:id=\"@android:id/tabcontent\"
android:layout_width=\"fill_parent\"
android:layout_height=\"0dip\"
android:layout_weight=\"1\"
android:padding=\"0dp\"/>
<TabWidget
android:id=\"@android:id/tabs\"
android:layout_width=\"fill_parent\"
android:layout_height=\"wrap_content\"
android:layout_weight=\"0\"/>
</LinearLayout>
</TabHost>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。