2011-11-22 95 views
0

我想將頁眉和頁腳的TabHost我試着但那不是顯示在用戶界面的任何改變我的繼承人代碼將頁眉和頁腳中的Android

<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
> 
<LinearLayout 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"> 
    <Button 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Button01" 
     /> 
</LinearLayout> 
<TabHost android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:id="@android:id/tabhost"> 
    <LinearLayout android:id="@+id/LinearLayout01" 
     android:orientation="vertical" android:layout_height="fill_parent" 
     android:layout_width="fill_parent"> 
     <TabWidget android:id="@android:id/tabs" 
      android:layout_height="wrap_content" android:layout_width="fill_parent"></TabWidget> 
     <FrameLayout android:id="@android:id/tabcontent" 
      android:layout_height="fill_parent" android:layout_width="fill_parent"></FrameLayout> 
    </LinearLayout> 

</TabHost></RelativeLayout> 

請幫助我,我要放置2個按鈕和標題在頁眉和頁腳上4個

按鈕

謝謝

阿布舍克

回答

0

你需要使用下面的屬性佈局上面和佈局也!

+0

您能否請您簡單解釋我 –

+0

您已經使用了相關佈局,但您是否正確使用了!我們使用relativelayout參考其他視圖來設置視圖。現在,當您在relativelayout中添加一些視圖時,這些子視圖的屬性如上面的佈局和下面的佈局。你需要設置這些。 – vikky