我可以在 Main Activity 中设置 android 启动器图标吗
Can I set android launcher icon in Main Activity
我们一直都知道在Manifest中设置android:icon可以设置icon和logo,
android:icon="drawable resource"
我可以使用 Java 代码在 Main Activity 中设置徽标图标吗?
感谢帮助
这篇answer可以帮到你。
摘自mike yaworski的回答:
Summary:
android:icon="@drawable/ic_launcher"
determines your launcher icon, so
just add images to the drawable folders and change ic_launcher
to
whatever the name of image is that you want to be the icon.
android:label="@string/app_name"
determines your "label" so just look
for app_name
(because the label is referenced to @string/app_name
) in
your strings.xml
file and change the contents of app_name.
我们一直都知道在Manifest中设置android:icon可以设置icon和logo,
android:icon="drawable resource"
我可以使用 Java 代码在 Main Activity 中设置徽标图标吗?
感谢帮助
这篇answer可以帮到你。 摘自mike yaworski的回答:
Summary:
android:icon="@drawable/ic_launcher"
determines your launcher icon, so just add images to the drawable folders and changeic_launcher
to whatever the name of image is that you want to be the icon.
android:label="@string/app_name"
determines your "label" so just look forapp_name
(because the label is referenced to@string/app_name
) in yourstrings.xml
file and change the contents of app_name.