How to change background color of app icon
Asked Answered
C

1

5

as you know Android 5 add a background color to old apps. Newest apps are able to set a background color for their icons. I'm using API Level 19 (Android 4.4.2) and here is how i set the icon for my app:

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    ...

Does exist any way to set the background color to my application for users that use it on Android 5.x phones?

On my phone (Android 5.1.1) the background color for my app is white (why white?), but today i make some edits and fixes to the code of my app (nothing related to colors) and now the background color of the app icon is orange! What could have changed it?

Anyway do you know a way to set that color?

Cheslie answered 2/10, 2015 at 9:53 Comment(0)
P
7

Chances are your icons are not on a transparent background. Here's a handy tool to help you generate working icons.

Philipp answered 2/11, 2015 at 19:41 Comment(2)
Why down-vote? I don't see any other answers here. I dealt with this issue myself and the tool I mentioned saved me a lot of time. In fact, Google itself refers to this utility in their Android dev documentation.Philipp
I see that the downvote was undone since you posted this comment. There is no sane reason why your answer should have been downvoted. You have my sympathies - there are times when the downvote system devalues perfectly good questions and answers for no apparent reason.Handling

© 2022 - 2024 — McMap. All rights reserved.