0

I have read many articles on "How to make a responsive app in android" everyone has suggested to use "multiple bitmaps" for each screen. I just want to know that

(1) Can we consider different drawable folders(drawable-hdpi,drawable-xdpi,drawable-xxdpi etc) in-supporting of tablets? or just these folders are designed for smart phones in order to get responsiveness?

  • yes you should consider .for reference , refer this http://stackoverflow.com/questions/16079588/setting-drawable-folder-to-use-for-different-resolutions – Radhey Oct 29 '16 at 04:10
  • did you get what you need ? – Omid Heshmatinia Oct 31 '16 at 07:38
  • actually i want to make my app responsive for tablets but i am confused to think about drawable folders . is there any specific folder for tablet's bitmaps in android? – Hafiz Muhammad Afzal Oct 31 '16 at 15:32
  • if you look at my answer, you will get the result! for tablets you have two options for drawable folders. first by the size of device ( drawable-xlarge ) second by width or height of device ( drawable-sw600 , etc ... ) @HafizMuhammadAfzal – Omid Heshmatinia Nov 14 '16 at 06:14

2 Answers2

7

In Android you have 2 type of qualifiers for image sizes:

  • Screen pixel density (dpi): Is the screen resolution. i.e. hdpi, xhdpi, tvdpi.
  • Screen size: Is the phisical size of the screen. i.e. small, normal, large, xlarge.

Some tablets have big screens, but with low dpi, there so they use images from mdpi or hdpi folder. But you can create special folders for tablets using the screen size qualifier to assign images. For example you can have:

res/
    drawable-mdpi/
    drawable-hdpi/
    drawable-xhdpi/
    drawable-xxhdpi/
    drawable-xlarge-mdpi/
    drawable-xlarge-hdpi/
    drawable-xlarge-xhdpi/
    drawable-xlarge-xxhdpi/

Your tablet will use the resources from drawable-xlarge- according to the dpi resolution.

To learn more about this refer to: https://developer.android.com/guide/topics/resources/providing-resources.html

Camilo Ortegón
  • 3,414
  • 3
  • 26
  • 34
3

Responsive app is not just about using different Drawables. It contains Layouts and Dimensions too. I advise you to read these two articles from google :

Designing for Multiple Screens

Supporting Multiple Screens

Omid Heshmatinia
  • 5,089
  • 2
  • 35
  • 50