2011-06-23 62 views

回答

1

请参阅下面的xml ...现在,如果您想将标签放到最下面,只需将Tabwidget移到Framelayout(相对)下面,因为tabwidget和Framelayout都位于相对布局内。

<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_alignParentBottom="true" 
       android:background="#FFFFFF" 
       android:layout_width="fill_parent" android:layout_height="wrap_content" 
       android:layout_marginLeft="0dip" android:layout_marginRight="0dip" /> 
      <FrameLayout android:id="@android:id/tabcontent" 
       android:background="#00FFFF" 
       android:layout_width="fill_parent" android:layout_height="wrap_content" /> 
     </RelativeLayout> 
    </TabHost> 

</LinearLayout>