简体   繁体   中英

How to add an icon to app_name for an APK

How i can add an icon for app_name also how to change font and color for the strings in the strings.xml file

<resources>
    <string name="app_name">MDF Service</string>
    <string name="service_ticker">MDF running</string>
    <string name="service_title">By Amrka</string>
    <string name="service_text">MDF is running.</string>
</resources>

To set the app icon you must set the android:icon attribute in the application tag in your manifest, as mentioned in the comments. Whatever image you pass as a value will be your app icon and will appear along with your app_name string in your device's app list.

It's a terrible practice to reference anything other than strings in the strings file because, as the name suggests, it's for strings only.

Image files are placed either in drawable or mipmap, usually drawable to keep it simple.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM