首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >底部的相对布局隐藏了与底部高度相等的中间布局。我的XML如下:

底部的相对布局隐藏了与底部高度相等的中间布局。我的XML如下:
EN

Stack Overflow用户
提问于 2011-09-15 17:30:30
回答 1查看 349关注 0票数 0
代码语言:javascript
运行
复制
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

    <RelativeLayout android:id="@+id/header"
    android:layout_width="fill_parent"
    android:layout_height="50dip"
    android:background="@drawable/activity_header_background">

        <TextView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"
        android:textSize="17dip"
        android:textStyle="bold"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        android:text="@string/help_faq_menu">
        </TextView>
    </RelativeLayout>

    <FrameLayout android:id="@+id/body"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+id/faq_header">

        <WebView
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" />

        <ProgressBar
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"
        style="?android:attr/progressBarStyle"
        android:layout_gravity="center_horizontal|center_vertical"
        android:visibility="gone">
        </ProgressBar>
    </FrameLayout>

    <RelativeLayout android:id="@+id/footer"
    android:layout_width="fill_parent"
    android:layout_height="50dip"
    android:background="@drawable/activity_footer_background"
    android:layout_alignParentBottom="true">

        <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="5dip"
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true"
        android:background="@drawable/button_drawable_shape"
        android:text="@string/done">
        </Button>

        <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:layout_centerVertical="true"
        android:background="@drawable/button_drawable_shape"
        android:text="@string/contact_support">
        </Button>

        <ImageButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/refresh"
        android:layout_marginRight="5dip"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:background="@null">
        </ImageButton>  
    </RelativeLayout>
</RelativeLayout>
EN

Stack Overflow用户

发布于 2011-09-15 19:41:49

代码语言:javascript
运行
复制
android:layout_below="@+id/body" give in footer Relativelayout

正文布局中的android:layout_above="@+id/footer"

而且body是framelayout,你为什么不使用相对布局,把高度固定到你想要的高度。

票数 0
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7428715

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档