是否可以通过用户选择更改 android 运行时中的启动器图标? [英] Is it possible to change launcher icon in android runtime with user selection?

查看:38
本文介绍了是否可以通过用户选择更改 android 运行时中的启动器图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用多个启动器图标.我希望用户可以通过他的选择更改启动器图标

I want to use multiple launcher icon . what i want that user can change launcher icon with his selection

是否可以更改启动器图标运行时间?

is it possible to change launcher icon run time?

推荐答案

严格来说,您不能在运行时更改启动器图标.但是,很少有可用的解决方法:

Strictly speaking you can not change launcher icon at run time. However there are few workarounds available for this:

1.活动别名:在 Manifest 中为您的 MAIN 启动器活动创建多个 activity-alias 标记,并为其提供不同的图标 drawable.然后,您可以根据需要通过代码选择特定的 activity-alias.

1. Activity alias: Create multiple activity-alias tags in Manifest for your MAIN launcher activity and give a different icon drawable to it. You can then choose a particular activity-alias via your code as per your requirement.

2.安装/卸载快捷方式:此方法不会更改您应用的图标,但您可以更新(读取重新安装)应用的快捷方式图标.

2. Install/Uninstall Shortcuts: This approach won't change the your app's icon however you can update (read re-install) your app's shortcut-icon.

希望这会有所帮助.

这篇关于是否可以通过用户选择更改 android 运行时中的启动器图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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