RecyclerView是网格显示的,数据大于1行,然后显示不全;
前后对比了代码,发现是 LinearLayout 中添加了 android:layout_marginBottom 导致的:
示例图:
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dp"
android:descendantFocusability="blocksDescendants"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_my_app"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/kd_enet_white"
tools:vi
RecyclerView 显示不全

解决RecyclerView在NestedScrollView中因LinearLayout的marginBottom属性设置而导致的内容显示不全的问题。
最低0.47元/天 解锁文章
6466

被折叠的 条评论
为什么被折叠?



