Android recyclerview v.23.2.0&设计库v.23.2.0已损坏 [英] Android recyclerview v.23.2.0 & design library v.23.2.0 are broken

查看:85
本文介绍了Android recyclerview v.23.2.0&设计库v.23.2.0已损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新到v23.2.0之后,recyclerview项具有奇怪的行为:很大,有空白。更新到设计库23.2.0之后,菜单溢出图标变为黑色(应用程序具有深色的动作栏)。

After update to v23.2.0 recyclerview items have strange behavior: very big with empty space. After update to design library 23.2.0 menu overflow icon became black (app has dark action bar).

更新
连结5溢出图标&回收器视图行是固定的,但在Galaxy Tab 4上的溢出图标仍为黑色。

UPDATE On my nexus 5 overflow icon & recycler view row are fixed, but on Galaxy Tab 4 overflow icon is still black.

更新2
如果您遇到问题留空间距,修复视图的布局参数(match_parent-> wrap_content),因为RecyclerView现在将根据其内容的大小自行调整大小。
阅读此博客
http:// android-developers .blogspot.am / 2016/02 / android-support-library-232.html


RecyclerView小部件提供了高级功能灵活的基础,可用于创建列表和网格以及支持动画。此版本为LayoutManager API带来了激动人心的新功能:自动测量!这允许RecyclerView根据其内容的大小自行调整大小。这意味着以前不可用的方案,例如现在可以使用WRAP_CONTENT作为RecyclerView的尺寸。您会发现所有内置的LayoutManager现在都支持自动测量。

The RecyclerView widget provides an advanced and flexible base for creating lists and grids as well as supporting animations. This release brings an exciting new feature to the LayoutManager API: auto-measurement! This allows a RecyclerView to size itself based on the size of its contents. This means that previously unavailable scenarios, such as using WRAP_CONTENT for a dimension of the RecyclerView, are now possible. You’ll find all built in LayoutManagers now support auto-measurement.

由于此更改,请确保仔细检查
的布局参数,以查看项目视图:现在将完全尊重以前忽略的布局参数(例如,滚动方向上的
MATCH_PARENT)。

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.

更新3
链接到用操作栏中的黑色图标描述问题的问题
问题201918

更新4
请参阅我的帖子,图标问题也已解决

UPDATE 4 See my answer under post, icons problem is also solved

推荐答案

您获得较大空位的原因是因为match_parent。以前无法正常运行,但是现在新版本的工作方式有所不同。您只需要更新到wrap_content而不是match_parent即可,因为这会导致布局与父级匹配,从而为您提供较大的空间。

The reason you are getting large open spaces is because of match_parent. It wasn't working correctly before, but now with the new release it is working differently. You just need to update to wrap_content instead of match_parent as that causes the layout to match the parent giving you the large spaces.


RecyclerView小部件为创建列表和网格以及支持动画提供了高级而灵活的基础。此版本为LayoutManager API带来了激动人心的新功能:自动测量!这允许RecyclerView根据其内容的大小自行调整大小。这意味着以前不可用的方案,例如现在可以使用WRAP_CONTENT作为RecyclerView的尺寸。您会发现所有内置的LayoutManagers现在都支持自动测量。

The RecyclerView widget provides an advanced and flexible base for creating lists and grids as well as supporting animations. This release brings an exciting new feature to the LayoutManager API: auto-measurement! This allows a RecyclerView to size itself based on the size of its contents. This means that previously unavailable scenarios, such as using WRAP_CONTENT for a dimension of the RecyclerView, are now possible. You’ll find all built in LayoutManagers now support auto-measurement.

http://android-developers.blogspot.co.uk/2016/02/android-support-library-232.html

这篇关于Android recyclerview v.23.2.0&设计库v.23.2.0已损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆