Android Support Repository 23.2.1 RecyclerView error [duplicate]

徘徊边缘 提交于 2019-12-12 09:19:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!