问题
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.
回答1:
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
.
来源:https://stackoverflow.com/questions/37504796/android-support-repository-23-2-1-recyclerview-error