成功遵循设置多个 LAUNCHER 活动的方法后(如 https://stackoverflow.com/a/3270783/978329)使用taskAffinity属性,我最终得到了单独的图标,每个活动一个。
我的问题是,基于父应用程序图标,所有这些图标看起来都一样。
我正在寻找一种为每个 LAUNCHER 活动分配不同视觉图标的方法
(例如,一个红色图标,一个绿色图标,一个蓝色图标等),因此区别不仅在于标签,还在于图形。
有什么想法吗?
After following successfully the method to set multiple LAUNCHER activities (as described in https://stackoverflow.com/a/3270783/978329) using the taskAffinity attribute, I ended up with having separated icons, one for each Activity.
My problem is that all these icons look the same, based on the parent application icon.
I am looking for a way to assign a different visual icon for each LAUNCHER activity
(e.g. one red icon, one green icon, one blue icon etc.) so the difference will not be only by the label, but also by the graphics.
Any idea?
发布评论
评论(2)
在清单的每个。
activity
元素中添加android:icon
属性并将其分配给可绘制对象。例如In each
activity
element of your manifest add theandroid:icon
attribute and assign it to a drawable. For example<activity ... android:icon="@drawable/icon_x"
.您可以
在定义为启动器的每个活动中使用:
You can use:
in each activity defined as launcher.