在android中放置页眉和页脚
我想把页眉和页脚放在TabHost上,但这并没有显示UI中的任何更改。这是我的代码在android中放置页眉和页脚,android,android-layout,android-ui,Android,Android Layout,Android Ui,我想把页眉和页脚放在TabHost上,但这并没有显示UI中的任何更改。这是我的代码 <?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" > <Linear
<?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个按钮放在页脚上
多谢各位
Abhishek您还需要使用属性上方和下方的布局 你能简单地给我解释一下吗?你用过relativelayout,但你用得对吗!!我们使用relativelayout参照其他视图设置视图。现在,当您在relativelayout中添加一些视图时,这些子视图具有类似上面布局和下面布局的属性。你需要设置这些。