How to change background color of app icon

smartmouse picture smartmouse · Oct 2, 2015 · Viewed 12.5k times · Source

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?

Answer

santa picture santa · Nov 2, 2015

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