Hafiz Muhammad Afzal
Hafiz Muhammad Afzal

Reputation: 13

Can we consider different drawable folders for tablets?

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?

Upvotes: 0

Views: 1203

Answers (2)

Omid Heshmatinia
Omid Heshmatinia

Reputation: 5236

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

Upvotes: 3

Camilo Ortegón
Camilo Ortegón

Reputation: 3692

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

Upvotes: 7

Related Questions