Android支持存储库23.2.1 RecyclerView错误 [英] Android Support Repository 23.2.1 RecyclerView error
问题描述
更新我的支持库23.2.1之后,我遇到了问题.即使我没有更改仅代码更新库,我的recyclerview项也不会显示.仅显示第一项,未显示其他项.我不知道为什么它没有显示所有要素.是否有人遇到此问题以及如何解决?
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
注意:很遗憾,我无法将IDE Eclipse更改为Android Studio.
Note: Unfortunaley I couldn't change my IDE Eclipse to Android Studio.
推荐答案
支持库23.2.1进行了更改
There was a change in the support library 23.2.1
RecyclerView.LayoutManager不再忽略某些内容 RecyclerView.LayoutParams设置,例如滚动中的MATCH_PARENT 方向.注意:这些解除的限制可能会导致意外 布局中的行为.确保指定正确的布局 参数.
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.
您需要在RecyclerView中更改布局项目才能使用WRAP_CONTENT
.
You need to change your layout items in your RecyclerView to use WRAP_CONTENT
.
这篇关于Android支持存储库23.2.1 RecyclerView错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!