Resource support for tablets and mobile phones

I need to support an application for mobile phones mdpi, hdpi and xhdpi and 7 'and 10' tablets. I must admit that I am a little lost.

So far I just made a tablet version and what I did:

  • one folder called "layout"
  • 3 different folders called "drawable-sw600dp", "drawable-sw800dp" and "drawable-sw1200" containing images of 600 pixels in size, 800 pixels in size and 1200 pixels in size.

I got the impression that I messed it up and that I should have created the standard "drawable-mdpi", "drawable-hdpi" and "drawable-xhdpi".

But if I do this:

  • In which folder should I put images for tablets? xhdpi only?
  • how large (in px) should the images for tablets be?
  • How big should the images be for mobile phones?
  • and last but not least: how to name the “layout” folders in order to have a different version for mobile phones and tablets?

I have already read the Android recommendation as 1000 times and I'm still confused ...

EDIT 1

This paragraph on the Android website answered my question: "How to name the" breadboard "folders to have a different version for mobile phones and tablets?"

EDIT 2

As for the dropdown folders, for mobile phones it seems quite obvious that I need to create 3 folders in this way:

  • drawable-mdpi containing 320 pixels wide images
  • drawable-hdpi containing 480 pixels wide images
  • drawable-xhdpi, 720

, .

+5
2

.

→ 2 :

  • "" ( "layout-sw320dp" ) .
  • "layout-sw600dp"

Drawables → 5 :

  • "drawable-mdpi" , 320
  • "drawable-hdpi" , 480 .
  • "drawable-xhdpi" , 720
  • "drawable-sw600dp" 7 '' , 600
  • "drawable-sw720dp" 10- , 720

, , !

+8

LDPI , 3 .

, 50x50 DP.

MDPI = 50x50PX

HDPI = 75x75PX (x1.5)

XHDPI = 100x100PX (x2.0)

, : drawable-xlarge-xhdpi drawable-xlarge-hdpi, , . , xlarge 10 ? , 9 . 3 , 3 7 ' 3 10'. !

Eclipse → → → Android XML

Drawable , , , .

, . !

.

enter image description here

, . - 7 ', xlarge - 10' ( ).

/RES/- MDPI

< > /RES/-

/RES/- xhdpi

/RES/-XLarge-MDPI

/RES/-XLarge-

/RES/-XLarge-xhdpi

7- Android- HDPI .

/xlarge/small ..

+3

All Articles