mco*_*mco 4 resources icons android android-appcompat
所以我在访问库中的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').
任何帮助表示赞赏谢谢.
支持库v7:23.2.0现在支持Vector Drawable.
这样,很多可绘制的东西变得无用或过时,并且被移除.
我认为这abc_ic_clear_mtrl_alpha被替换为abc_ic_clear_material使用vector:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:pathData="M19,6.41L17.59,5,12,10.59,6.41,5,5,6.41,10.59,12,5,17.59,6.41,19,12,13.41,17.59,19,19,17.59,13.41,12z"
android:fillColor="@android:color/white"/>
</vector>
Run Code Online (Sandbox Code Playgroud)
如您所见,新图标使用vector和colorControlNormal.
您可能需要检查此问题以检查如何启用Vector并更改图标的颜色.
| 归档时间: |
|
| 查看次数: |
1622 次 |
| 最近记录: |