android 布局上下结构 relativelayout问题,

Paste_Image.png

布局如下:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/hui"
    android:scrollbars="none">

    <RelativeLayout
        android:id="@+id/fff"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@color/white">
        <Button
            android:id="@+id/sctocheckout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_marginLeft="@dimen/View_margin_10"
            android:background="@color/textRed"
            android:padding="@dimen/View_margin_10"
            android:singleLine="true"
            android:text="@string/addtocart"
            android:textColor="@color/white"
            android:textSize="@dimen/Font_Size_18" />
    </RelativeLayout>

    <ListView
        android:id="@+id/ShopFavoriteLv"
        style="@style/list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@id/fff"
        android:background="@color/gray"
        android:layout_alignParentTop="true"
        android:choiceMode="none"
        android:divider="@null"
        android:dividerHeight="@dimen/View_margin_3"
        android:footerDividersEnabled="false"
        android:headerDividersEnabled="false"
        android:scrollbars="none"></ListView>
</RelativeLayout>



遇到的问题
添加button android:layout_alignParentBottom="true" 就只看到relatelayout了,看不到listview了

Paste_Image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 175,079评论 25 709
  • ¥开启¥ 【iAPP实现进入界面执行逐一显】 〖2017-08-25 15:22:14〗 《//首先开一个线程,因...
    小菜c阅读 11,712评论 0 17
  • Day1: 在代码中通过R.string.hello_world可以获得该字符串的引用; 在XML中通过@stri...
    冰凝雪国阅读 5,309评论 0 5
  • 窗外淅淅沥沥落起雨来,清澈绵长的雨丝飘挂而下。路边的印度紫檀,对面的红屋顶,更远处的淡黄色大楼,还有那一角亮白色的...
    吾阿哇阅读 1,280评论 0 0
  • 我自小就是一个“没人管”的孩子。当然我有爱我的爸爸妈妈,可是,在我童年的记忆里,什么事情都是我自己来。 我曾埋怨爸...
    DrPepper阅读 2,738评论 2 2