I'm new to Android development (using Mono for Android), I've read this, this this and a some other questions here on SO but I'm not sure on how to provide all necessary Icon files for my application.
- From the template project, the IDE created for me a
drawable/
folder with an 48x48 px Icon.png file. - Since I need to provide alternative resources, I grabbed a PNG file which serves as my application icon and used the Android Asset Studio (mentioned in the docs) and it generated the following files for me:
drawable-hdpi/ic_launcher.png
(72x72 px)
drawable-mdpi/ic_launcher.png
(48x48 px)
drawable-xhdpi/ic_launcher.png
(96x96 px)
drawable-xxhdpi/ic_launcher.png
(144x144 px)
(I don't know why, but the Android Asset Studio did not generate the ldpi
version, so I resized myself a 36x36 icon.)
Now I'm lost
1. Should I maintain a 48x48 px copy in both drawable-mdpi/
and drawable/
?
If I keep the icon only in the drawable-mdpi/
, may the application crash on older devices / versions of the Android (because the default resource is missing)?
1. If I keep the icon only in the drawable/
(the fallback), what is the point in using drawable-mdpi/
at all?
Since I don't know exactly what to do, I'm left my project drawable folders as follows:
drawable/ic_launcher.png
(48x48 px)
drawable-hdpi/ic_launcher.png
(72x72 px)
drawable-ldpi/ic_launcher.png
(36x36 px)
drawable-mdpi/ic_launcher.png
(48x48 px)
drawable-xhdpi/ic_launcher.png
(96x96 px)
drawable-xxhdpi/ic_launcher.png
(144x144 px)
But it is still not clear for me.
EDIT:
If I provide all possible "alternative" resources, then the default (drawable/
) resource folder will become redundant, thus I could delete it. However I'm reluctant of not providing the default resources because it seems more reasonable to do the opposite: first provide the "default" resources and then provide "alternative" resources as needed.