Android Support Library rev 23.2 and RecyclerView

On the left - 23.1.1, and on the right - 23.2.0 Updated in the Android Support Library rev 23.2, and it added full screens to the RecyclerView between each item. Has anyone experienced this problem?

+2
android android-recyclerview
Feb 25 '16 at 21:24
source share
1 answer

This happens when your RecyclerView rows have a match_parent in the scroll direction.

For example, if a RecyclerView with a vertical LinearLayoutManager has the following layout for each row, that row will now actually match the parent height. Prior to version 23.2.0, it would still just wrap the contents anyway.

 <View android:layout_width="match_parent" android:layout_height="match_parent" /> 

In this case, changing the height to wrap_content will solve the problem.

This issue is briefly mentioned in a blog post :

Because of this change, make sure that you double-check the layout options for your position views: previously ignored layout options (e.g. MATCH_PARENT in the scroll direction) will now be fully respected.

+12
. Feb 25 '16 at 21:39
source share



All Articles