
我只能选择HolO_liGHT,HolO_DARK和CUSTOM.即使我使用#FFFFFF定制,图标也有点透明.
Android Asset Studio网站https://romannurik.github.io/AndroidAssetStudio/icons-generic.html创建的图标没有透明度,但它们太小了
有没有快速创建材料图标的方法?
解决方法 您可以通过设置项目色调来更改图标颜色,请查看以下示例<ImageVIEw androID:layout_wIDth="16dp" androID:layout_height="16dp" androID:src="@drawable/ic_icon_next" androID:tint="#FFDE2F" tools:ignore="ContentDescription" />
如果图标是光栅image- drawable_icon_next.xml,则在drawable文件夹中创建一个文件
<?xml version="1.0" enCoding="utf-8"?><bitmap xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:src="@drawable/ic_action_settings" androID:tint="#FFDE2F"/>
要么
<?xml version="1.0" enCoding="utf-8"?><selector xmlns:androID="http://schemas.androID.com/apk/res/androID"> <item androID:color="#FFDE2F" androID:state_checked="true" /> <item androID:color="#FFDE2F" androID:state_checked="false" /></selector>
并使用这个drawable项目.
<item androID:ID="@+ID/menu_item_next" androID:icon="@drawable/drawable_icon_next" androID:title="Menu Title" app:showAsAction="always"/>总结
以上是内存溢出为你收集整理的如何在Android Studio中创建材质 *** 作栏图标全部内容,希望文章能够帮你解决如何在Android Studio中创建材质 *** 作栏图标所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)