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