-1

I have an old project to work with, a lot of refactoring and so on. All the icons and images are storing in mipmap folders. But there is a strange behaviour

For example, if you have an icon, which has only one size you just put it into mipmap-nodpi or in drawable-nodpi as i used, but as i mentioned before, all image resources are lying in mipmap folders. So wha's the issue:

When i'm putting some image into mipmap-nodpi it's not working for my Samsung J4, image, for some reason is very small, so i've also puted it into mipmap-xhdpi(which helped me) and accidentaly also puted it into mipmap-xxhdpi. So, my client showed me a sceen, that shows that on his Samsung Galaxy S5 this image is very small also, after just blindly deleting and adding this image into different mipmap folders, i've found out, that this behaviour is caused by image in mipmap-xxhdpi folder, and when i've deleted it, image is showed correclty on S5

My question: So basically i'm confused. What is the logic behind you should put image into mipmap-xhdpi in order for it to correclty show on Samsung J4, but you shouldn't put image into mipmap-xxhdpi(which is the corret folder for Samsung S5) for it to show correctly on Samsung 5? Does it have something to do with mipmap in particular?

Nik Myers
  • 1,843
  • 19
  • 28

1 Answers1

0

What is the logic behind you should put image into mipmap-xhdpi in order for it to correclty show on Samsung J4, but you shouldn't put image into mipmap-xxhdpi(which is the corret folder for Samsung S5) for it to show correctly on Samsung 5? Does it have something to do with mipmap in particular?

I don't know the logic behind it, but you can have look on official site that says drawable other than launcher icon should put in drawable folder not in mipmap folder


Under Drawable folder

drawable/ Bitmap files (.png, .9.png, .jpg, .gif) or XML files that are compiled into the following drawable resource subtypes:

  • Bitmap files
  • Nine-Patches (re-sizable bitmaps)
  • State lists
  • Shapes
  • Animation drawables
  • Other drawables

Under mimmap folder

Drawable files for different launcher icon densities.

Community
  • 1
  • 1
N J
  • 27,217
  • 13
  • 76
  • 96
  • 1
    You're correct, but the things is, i want to know what causes this behaviour, i can't do this operation without client agreeing, so maybe the resources will be always in mipmap folders =( – Nik Myers Sep 02 '16 at 08:40