0
我想在显示器的中心底部设置一个选项卡。如何在android的显示底部设置选项卡?
我想在显示器的中心底部设置一个选项卡。如何在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"
/>
谢谢!
使用layout_weight = “0” 为TabWidget和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>
为什么DONOT您使用按钮,而不是标签? – 2011-05-31 11:14:16
你正在寻找的屏幕截图或图表可以帮助人们更好地理解你的问题。例如,在Android上,标签通常位于顶部的组中。 – CommonsWare 2011-05-31 11:16:45