[英]How to set tab bar at the bottom in android?
我在android中使用標簽欄。
默認情況下,它顯示在頂部。
我希望它顯示在底部。
有人可以解釋一下該怎么做嗎?
請檢查此鏈接: 如何在屏幕底部對齊TabHost
為TabWidget添加android:layout_alignParentBottom =“ true”可以達到目的。
只需將內容布局放在選項卡小部件上方。 有關更多信息,請參見以下鏈接。 Android:底部的標簽
<?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"
android:padding="1dp" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="5dp" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>>
</TabHost>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.