RecyclerView有时候只显示一部分,我们需要全部显示,用<RelativeLayout>包住就可以展开了,操作如下:
<RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.RecyclerView android:id="@+id/recycle_view_cargoInfo" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/write" /> </RelativeLayout>