When I created Xamarin.Android project in Visual Studio 2017 2 years ago in Resources folder I had drawable folder and drawable-hdpi, drawable-mdpi, drawable-xhdpi etc. folders. If I remember well I put the image I wanted to use in the application in drawable folder, and if the device the application was running on had big screen, it looked for the image in drawable-xhdpi or drawable-xxhdpi and if there was no image there it got the image from drawable folder. I installed Visual Studio 2017 some months ago and instead of drawable,drawable-hdpi, drawable-mdpi, drawable-xhdpi etc. I have mipmap-anydpi-v26, mipmap-hdpi, mipmap-mdpi, mipmap-xhdpi etc. folders. My question is do I proceed as before, if I want to put and image for all device screen sizes I put it in mipmap-anydpi-v26 and if I want to put an image for a specific device screen size I put it in drawable-xhdpi for example? Does anything change with the new folders?
1 Answers
The mipmap folders are for placing your app/launcher icons (which are shown on the homescreen) in only. Any other drawable assets you use should be placed in the relevant drawable folders as before.
According to the this article:
Why use mipmaps for your launcher icons?
Using mipmaps for your launcher icon is described as best practice by the Android team. The advantage you get is that you can keep resources in the mipmap folders for all device densities and then strip out other resources from the drawable folders that are not relevant to the specific users device density.
It’s best practice to place your app icons in mipmap- folders (not the drawable- folders) because they are used at resolutions different from the device’s current density.
When referencing the mipmap- folders ensure you are using the following reference:
Icon = "@mipmap/icon"
It’s best practice to place your app icons in mipmap- folders (not the drawable- folders) because they are used at resolutions different from the device’s current density.
So, The mipmap folders are for placing your app/launcher icons (which are shown on the home screen) in only. Any other drawable assets you use should be placed in the relevant drawable folders as before android-developers.googleblog.com/2014/10/… – FreakyAli