由于自定义ScrollView使得嵌套在里面的Recyclerview条目显示不全,原因是sdk兼容到23版本以上就会出现这个问题
解决:
1.RecyclerView上再嵌套一层RelativeLayout然后添加属性android:descendantFocusability="blocksDescendants"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
2.使用NestedScrollView代替ScrollView然后添加属性android:nestedScrollingEnabled="false"