2011-11-22 130 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