简体   繁体   English

在Android中放置页眉和页脚

[英]Place Header and Footer in android

I wanted to place Header and footer on the TabHost Im trying but thats not showing any change in UI heres my code 我想在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"
>
<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>

Please Help me I want to place 2 buttons and title on Header and 4 buttons on footer 请帮我,我想在页眉上放置2个按钮和标题,在页脚上放置4个按钮

Thank you 谢谢

Abhishek 阿比舍克

您还需要使用属性上方和下方的布局!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM