[Disclaimer: First of all I know there are many posts about the drawable and the mipmap folder, I read a descent bunch of them]
From the book Android Programming - The Big Nerd Ranch Guide there is an example in which I have to insert an icon next to some text on a Button
. For higher resolution screens it would make sense to include multiple sizes of the icon. In their solution they have all their images in many different Drawable folders with different resolution sizes of the image.
I got it working by just putting the icons in the drawable folder after a lot of trial and error to get it working in the mipmap folder:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/next_button"
android:text="@string/next_button"
android:drawableRight="@drawable/arrow_right/"/>
However, I got some confusion about how it works:
- People often say that only the app icon should be placed in the mipmap folders, is that true? What is the app icon? Others say that only the launcher icons should be placed there while still others say that only icons should be placed there. Which one is it, they are mutually exclusive options!
- I can't auto-complete into the mipmap folder within Android Studio which makes me think that I have to put everything into my drawable folder since there Android Studio does auto-completion for me. But, by default the drawable folder has no sub-folders. This leaves me to believe that the drawable folder should no longer be used for images of different resolutions, since why else would the default be no folders, so everyone can make spelling mistakes..
- When would it not make sense to have icons available in different resolutions? I can't imagine someone not wanting the highest possible resolution..
From here I got some of my confusion:
The mipmap folders are for placing your app icons in only.
What does that mean? From google translate I get:
icon: a symbol or graphic representation on a screen of a program, option, or window, especially one of several for selection.