
解决方法:
当您的RecyclerVIEw行的大小在滚动方向上设置为match_parent时会发生这种情况.
例如,如果具有垂直linearlayoutmanager的RecyclerVIEw对于每一行具有以下布局,则该行现在实际上将与父级的高度匹配.在版本23.2.0之前,它仍然只是包装内容.
<VIEw androID:layout_wIDth="match_parent" androID:layout_height="match_parent" />在这种情况下,将高度更改为wrap_content将解决此问题.
在the announcement blog post中简要提到了这个问题:
总结Due to this change, make sure to double check the layout parameters of
your item vIEws: prevIoUsly ignored layout parameters (such as
MATCH_PARENT in the scroll direction) will Now be fully respected.
以上是内存溢出为你收集整理的Android支持库rev 23.2和RecyclerView全部内容,希望文章能够帮你解决Android支持库rev 23.2和RecyclerView所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)