2011-04-20 62 views
0

你好朋友我在我的代碼中實現TAbHost,並且我想在任何小部件(按鈕,TextView等等)下面選項卡,但是我不這麼做。 Plz幫助我。Android中的TabHost

將顯示在頂部小部件和低於小部件選項卡的Xml中的方法。

+0

我發現我的Andswer ..... Thankx的建議 – AndroidDanger 2011-05-07 08:23:23

回答

1

你想把標籤放在頂部或製表符底部的佈局?我無法理解。

如果你的意思是在上面我建議你做Google Tab Layout Tutorial

我希望幫助

0
<?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"> 
    <FrameLayout android:id="@android:id/tabcontent" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_alignParentTop="true" 
     android:layout_above="@android:id/tabs" /> 
<TabWidget android:id="@android:id/tabs" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" /> 
</RelativeLayout>