2

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

King Bufo
  • 181
  • 1
  • 13

3 Answers3

2

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.

Chirag
  • 56,621
  • 29
  • 151
  • 198
  • Thanks i got the directories now. But when i want to make a new Image Asset it gets automatically saved in mipmap. why is this the case? – King Bufo Jul 03 '17 at 11:28
  • Have you created drwable-hdpi and other folders in res folder? – Chirag Jul 03 '17 at 11:29
  • i now inserted the image manually in the drawable folder and it works. why it doesnt when i do it with new->image asset->launcher icons. – King Bufo Jul 03 '17 at 11:33
  • Because you are selecting the launcher icons and the launcher icons are always go into mipmap folder. – Chirag Jul 03 '17 at 11:37
  • and how i insert a image "normally"? edit: google is my friend :P . ty Chirag for your help – King Bufo Jul 03 '17 at 11:39
1

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.

Cecil Paul
  • 595
  • 6
  • 27
0

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

Rami Amro Ahmed
  • 782
  • 1
  • 8
  • 11