更新到v23.2.0后,recyclerview项目有奇怪的行为:空间非常大.更新到设计库23.2.0菜单溢出图标变为黑色(应用程序有黑暗的操作栏).
更新 在我的nexus 5溢出图标和回收器视图行是固定的,但在Galaxy Tab 4溢出图标仍然是黑色.
更新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的维度.您会发现所有内置的LayoutManagers现在都支持自动测量.
由于此更改,请务必仔细检查项目视图的布局参数:现在将完全遵循先前忽略的布局参数(例如滚动方向中的MATCH_PARENT).
更新3 链接到描述操作栏问题201918中黑色图标 问题的问题
更新4 在帖子下看到我的回答,图标问题也解决了
android android-support-library android-recyclerview android-support-design
我最近更新了我的Android支持库昨天到版本 23.2.0
并且所有前Lolipop设备突然将后箭头,汉堡包和(三点菜单)的颜色改为黑色.当他们总是白色的时候.
棒棒糖设备似乎很好.
这是我style.xml在更新之间根本没有编辑过的.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primaryColor</item>
<item name="colorPrimaryDark">@color/primaryColorDark</item>
<item name="colorAccent">@color/accentColor</item>
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppTheme.Base">
</style>
<!-- Theme to customise the tool bar -->
<style name="MyCustomToolBarTheme" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="textColorPrimary">@color/textColorWhite</item>
<!-- Added this now to test, still nothing --!>
<item name="colorControlNormal">@color/textColorWhite</item>
</style>
<style name="MyApp.MyCustomToolBarStyle" parent="@style/Widget.AppCompat.Light.ActionBar">
<!--to add-->
</style>
</resources>
Run Code Online (Sandbox Code Playgroud)
然后这是我的工具栏布局
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
android:background="@color/primaryColor"
app:theme="@style/MyCustomToolBarTheme"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark">
</android.support.v7.widget.Toolbar>
Run Code Online (Sandbox Code Playgroud) 所以我在访问库中的appcompat图标时遇到了麻烦,我不知道为什么.
// build.gradle
`compile 'com.android.support:appcompat-v7:23.2.0'`
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用此图标: @drawable/abc_ic_clear_mtrl_alpha
// styles.xml
<style name="MyTheme" parent="Theme.AppCompat.Light">
<item name="homeAsUpIndicator">@drawable/abc_ic_clear_mtrl_alpha</item>
</style>
Run Code Online (Sandbox Code Playgroud)
但我得到这个错误: Error:(12, 5) No resource found that matches the given name (at 'homeAsUpIndicator' with value '@drawable/abc_ic_clear_mtrl_alpha').
任何帮助表示赞赏谢谢.