I only got one mipmap directory. (xhdpi,mdpi,xxhdpi etc are missing)

1.5k Views Asked by At

When i implement an ImageView the quality is very low and i cant choose between mipmap folders (xhdpi,mhdpi,xxhdpi etc.). The images are all in one directoy so i cant define in with src or background.

Here a picture of my res directory

How can i achieve an imageview with a good resolution.? I tried several ways and it not seem to work out. I appreciate your help

3

There are 3 best solutions below

0
On

you should add xhdpi,mdpi,xxhdpi as directories in the res folder right click res>> new >>Android resource directory select resource type as mipmap and available qualifiers select density then click the >> button select on of the densities from the drop down menu repeat for each density you need.

then place each designated image in its own density folder, android should then automatically use the resource that matches every screen density

0
On

Try https://romannurik.github.io/AndroidAssetStudio/

Where you can download your assets as zip file which you can extract to different directories like xhdpi,mdpi,xxhdpi. Then you can copy that it to the resource folder.

5
On

mipmap folders are only used for the launcher icons. You have to use the drawable-hdpi,drawable-xhdpi etc for the different size images.

Please take a look here.

You can see only directory for mipmap but all the ic_launcher images are there.