android 選項卡(TabHost)如何放置在屏幕的底部
更新時間:2013年01月07日 14:36:29 作者:
如何將TAB放置在屏幕的底端,有很多的新手都想實現(xiàn)這種效果,本文搜集整理了一些,感興趣的朋友可以參考下哦
今天寫Tab的時候由于TAB的跳轉問題去查資料,倒反而發(fā)現(xiàn)更有趣的問題,就是如何將TAB放置在屏幕的底端。
<?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:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:padding="5dp" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</TabHost>
復制代碼 代碼如下:
<?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:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:padding="5dp" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</TabHost>
您可能感興趣的文章:
相關文章
Android 4.4.2 橫屏應用隱藏狀態(tài)欄和底部虛擬鍵的方法
這篇文章主要介紹了Android 4.4.2 橫屏應用隱藏狀態(tài)欄和底部虛擬鍵的方法,需要的朋友可以參考下2017-01-01
超詳細的Android開發(fā)調試工具ADB命令及安裝介紹
這篇文章主要介紹了Android調試工具ADB安裝使用技巧,非常詳細,有需要的朋友可以借鑒參考下,希望可以有所幫助,祝大家早日升值加薪2021-09-09
Android通過滑動實現(xiàn)Activity跳轉(手勢識別器應用)
這篇文章主要為大家詳細介紹了Android通過滑動實現(xiàn)Activity跳轉,,講解手勢識別器應用,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-05-05

