Aykut Uludağ Aykut Uludağ - 1 year ago 122
Android Question

Android Support Repository 23.2.1 RecyclerView error

After update my support libraries 23.2.1, I encountered a problem. Even I didn't change any code only library update, my recyclerview item's become not shown. Only first item shown, others not shown. I have no idea why it is not show all elements. Is there anybody encounters this problem and how to fix it?

Before library update

After library update

Note: Unfortunaley I couldn't change my IDE Eclipse to Android Studio.

Answer Source

There was a change in the support library 23.2.1

RecyclerView.LayoutManager no longer ignores some RecyclerView.LayoutParams settings, such as MATCH_PARENT in the scroll direction. Note: These lifted restrictions may cause unexpected behavior in your layouts. Make sure you specify the correct layout parameters.

You need to change your layout items in your RecyclerView to use WRAP_CONTENT.