我可以在Android快捷方式功能中为图标着色吗?

卡塔马斯

我的Android快捷方式功能具有这样的xml

<shortcuts
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android">
    <shortcut
        android:shortcutId="some_id"
        android:enabled="true"
        android:icon="@drawable/ic_icon"
        android:shortcutShortLabel="@string/short_label"
        android:shortcutLongLabel="@string/long_label"
        tools:targetApi="n_mr1">
        <intent
            android:action="android.intent.action.MAIN"
            android:targetPackage="my.package"
            android:targetClass="my.package.MainActivity" />
    </shortcut>
</shortcuts>

目前,我的图标是可绘制的矢量,并且具有白色调。

我可以在文件定义中以某种方式使用其他色彩吗?所以像:

<shortcut
    ...
    android:icon="@drawable/ic_icon"
    android:iconTint="#0000ff"
    ...>

</shortcut>
托比亚斯

既不存在android:tint="color"也不存在android:iconTint="color"

您可以使用Android Studio图片素材资源创建快捷方式图标(用于静态快捷方式)

或使用动态快捷方式并通过编程设置其色调drawable.setTint(tint)

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Android 7.1静态应用程序快捷方式创建者可以将附加功能用于意图吗?

我可以安全地使用此弱自自动键入快捷方式吗?

可以在快捷方式中显示meta / cmd键吗?

我可以添加快捷方式来替换Linux中的路径吗?

我可以禁用“ Alt + Shift”快捷方式来更改Windows 8.1(或Windows 10)中的语言吗?

我可以使用快捷方式永久更改Vim设置吗?

我可以在存储库中使用yum的快捷方式吗?

在设置快捷方式中添加图标

Android:当用户在主屏幕中按住快捷方式图标时添加其他选项

有什么方法可以设置Android应用程序的快捷方式名称吗?

我可以使用PATH目录中的快捷方式吗?

我可以创建Windows目录的快捷方式吗?

我可以创建快捷方式来打开/关闭Windows 7 Aero功能吗?

我需要Win + Alt + D功能,但可以单击快捷方式

我可以设置从模板发送Outlook电子邮件的快捷方式吗?

我可以在Notepad ++中设置快捷方式来切换标签栏吗?

为studio.sh创建桌面快捷方式图标

我可以通过快捷方式使用sudo命令执行程序吗?

面板快捷方式中缺少图标

我可以从Windows 10的快速访问中删除“桌面”快捷方式吗?

我可以在此面板上添加应用程序快捷方式吗?XFCE

Powershell脚本可以禁用Windows 10中的辅助功能快捷方式吗?

在 gnome-terminal 中,我可以为同一个功能分配多个快捷方式吗?

我可以恢复`~/` 快捷方式吗?

在 Android Studio 中禁用快捷方式

android studio中的syso快捷方式?

我可以让启动器快捷方式根据条件执行不同的操作吗?

我可以在 Siri 快捷方式中为建议的调用短语提供动态字符串吗?

Xamarin 为快捷方式设置自定义图标