2010-06-23 73 views
2

我想在android上製作一個Tab控件。 但標籤控件顯示在頂部,其中我想它要顯示的底線android上的Tabcontrol

任何人可以在你的佈局,

回答

1

的tabwidget對象幫助是將包含選項卡中的視圖。 您可以將其移動到屏幕上您喜歡的任何位置。

這是一個關於如何將其與RelativeLayout的

<?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"> 

    <RelativeLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent"> 

     ... 

     <TabWidget 
     android:id="@android:id/tabs" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true"/> 

    </RelativeLayout> 

到屏幕底部的例子