0

Welcome.

I need to prepare UI for different screen sizes. I make layouts layout-small layout-normal layout-large layout-XLARGE For this I-small drawable, drawable-normal, drawable-large, drawable-XLARGE. But where to get the screen size from small to XLARGE. I mean the size of For example, 320 x 480 Where to get the dimensions for each screen? To prepare the graphics?

D Mac
  • 3,727
  • 1
  • 25
  • 32
Silesia
  • 67
  • 1
  • 9
  • Hello, you should go through this [Supporting multiple screens](http://developer.android.com/guide/practices/screens_support.html). – R.daneel.olivaw Mar 28 '12 at 07:34
  • Take a look at those links http://stackoverflow.com/questions/6577430/how-to-get-screen-size-and-respond-to-it http://stackoverflow.com/questions/6589101/how-to-get-screen-size-of-device – denizt Mar 28 '12 at 07:36
  • your question is unclear.Do want to test ur app on different screens? – himanshu Mar 28 '12 at 07:39

2 Answers2

0

if you want to do in code you can use Display class of android and use method getRectSize and getSize for the same. Please See API here

If you want to see the differences between screen sizes you can look at this Supporting Multiple Screens

Deepak Goel
  • 5,624
  • 6
  • 39
  • 53
  • 320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc). 480dp: a tweener tablet like the Streak (480x800 mdpi). 600dp: a 7” tablet (600x1024 mdpi). 720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc). But this is a different screen resolution, not size. I have no idea what size buttons to prepare (ImageButton) for each layout. MDPI / Hdpi not responsible for the screen size. – Silesia Mar 28 '12 at 07:53
0

first of all you have to read this at least. As bit of advice, you can start with the graphics for the mdpi device. For the mdpi devices 1 pixel is equivalent to 1 dpi. Then you can make the same graphic for the hdpi just multiply the pixel of the mdpi image * 1.5, and for the ldpi just multiply the pixel of the mdpi image * 0.75..

Blackbelt
  • 156,034
  • 29
  • 297
  • 305
  • 320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc). 480dp: a tweener tablet like the Streak (480x800 mdpi). 600dp: a 7” tablet (600x1024 mdpi). 720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc). But this is a different screen resolution, not size. I have no idea what size buttons to prepare (ImageButton) for each layout. MDPI / Hdpi not responsible for the screen size. – Silesia Mar 28 '12 at 07:54