蒙牛小布丁 2016-04-20 03:50 采纳率: 0%
浏览 1755
已结题

RecycleView是不是占用它布局以下的所有空间啊

RecycleView是不是占用它布局以下的所有空间啊,我布局文件中它下面的布局全显示不见了,现在正在考虑添加footview布局问题。

代码如下:
<?xml version="1.0" encoding="utf-8"?>
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<include layout="@layout/include_app_margin" />

<include layout="@layout/include_order_head" />

<include layout="@layout/include_app_margin" />

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="42dp"
    android:background="@color/white">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_marginLeft="10dp"
        android:drawableLeft="@drawable/business"
        android:drawablePadding="10dp"
        android:text="新光控股集团" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:layout_marginRight="10dp"
        android:drawableLeft="@drawable/pin_gray"
        android:drawablePadding="10dp"
        android:text="义乌" />
</RelativeLayout>

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    >

    <include
        android:id="@+id/rv_confirm_order"
        layout="@layout/include_rfresh_recyclerview" />

    <!--RecycleView以下的布局全显示不出来-->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/rv_confirm_order"
        android:layout_alignParentBottom="true"
        android:background="@color/white"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:orientation="vertical"
            android:paddingRight="10dp">

            <TextView
                android:id="@+id/tv_subtotal"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="right"
                android:text="小计:¥400.00"
                android:textColor="@color/orangered" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="right"
                android:text="生产周期:7天" />

        </LinearLayout>

        <include layout="@layout/include_app_margin" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="@color/white"
            android:paddingLeft="10dp"
            android:paddingRight="10dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:textSize="@dimen/font_size_mid"
                android:text="运费" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:drawablePadding="5dp"
                android:drawableRight="@drawable/next_icon"
                android:textSize="@dimen/font_size_mid"
                android:text="自提" />
        </RelativeLayout>

        <include layout="@layout/include_app_margin" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/tv_remark"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_marginLeft="10dp"
                android:text="备注:" />

            <com.jushi.trading.view.DrawableRightEditText
                android:layout_toRightOf="@+id/tv_remark"
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:background="@color/white"
                android:hint="给商家留言"
                android:paddingLeft="10dp" />
        </RelativeLayout>

        <include layout="@layout/include_app_margin" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:paddingLeft="10dp"
            android:paddingRight="10dp">

            <TextView
                android:id="@+id/tv_total"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:text="合计:¥200.00"
                android:textColor="@color/orangered" />

            <Button
                android:layout_width="80dp"
                android:layout_height="40dp"
                android:layout_alignParentRight="true"
                android:background="@drawable/selector_yellow"
                android:text="提交订单" />
        </RelativeLayout>
    </LinearLayout>
</RelativeLayout>


  • 写回答

2条回答

  • rvncds 2016-04-20 05:55
    关注

    RecycleView和gridview类似,如果RecycleView下面还有控件,那你这个布局文件就不能这样写

    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题