3

I want to know that why the latest version of Android Studio(3.0.1) has no drawable(ldpi,mdpi,hdpi,xdpi,xxdpi,xxxdpi), and has drawable-v21 ,drawable-24 and drawable folder only. for different resolution what we have to do? I have few Questions here.

1) Whey not the drawable(ldpi,mdpi,hdpi,xdpi,xxdpi,xxxdpi) created by default as before?

2) What is the purpose of drawable-21 and drawable-24?

M.ArslanKhan
  • 3,640
  • 8
  • 34
  • 56
  • I am very new to Android Studio but in version 3.2 I do not see drawable-21 nor drawable-24 folders. I did some reading about the mipmap directory and found this thread: https://stackoverflow.com/questions/23935810/mipmap-drawables-for-icons it may help you. – Ves Oct 02 '18 at 15:32

3 Answers3

0

1) Whey not the drawable(ldpi,mdpi,hdpi,xdpi,xxdpi,xxxdpi) created by default as before?

As you can see you can now add vector graphics to android project. Folders are not created to bring attention to vector graphics support and to discourage using bitmaps for icons and to escalate problem to ask questions like you asked. You can now include PhotoShop psd files and SVGs to your project. If you min target below API v21 it will automatically create bitmaps for all resolutions. If above it will use VectorDrawable and apk size will decrease drammatically, since images for highly-dense devices contribute too much to apk size.

2) What is the purpose of drawable-21 and drawable-24?

21 and 24 correspond to different API versions. So that you can have different design for Android 6 and Android 7.

Access Denied
  • 8,723
  • 4
  • 42
  • 72
0

First : ldpi,mdpi,hdpi,xdpi,xxdpi,xxxdpi are not created by default here are the sites that will help you to create it easily https://romannurik.github.io/AndroidAssetStudio/ and https://www.img-bak.in/.

Second : When you set images in folder drawable-21 and drawable-24 it means that images or drawables inside that folder is the one to be use if the device SDK version is 21 (Lollipop) or 24 (Nougat) is met. The purpose of that is for compatibility.

Mihae Kheel
  • 2,441
  • 3
  • 14
  • 38
0

to find the drawable ldpi,mdpi,hdpi,xdpi,xxdpi,xxxdpi and all

In IDE at left top corner select Packages instead of Android

under Packages you can see the Libraries -> drawable-hdpi,drawable-hdpi-v4, drawable-en-hdpi,drawable-ldpi,drawable-mdpi,drawable-xhdpi, drawable-xxhdpi and so on

drawable-21 and drawable-24 are api specific as said by Access Denied.

Thank you

Vijaya Varma Lanke
  • 603
  • 2
  • 7
  • 19