0

I am new to designing for android apps, and i have seen layout folders being split into four folders 1)layout-small 2)layout 3)layout-large 4)layout-xlarge

But i dont know which type of devices go into which of the above folders.There are many devices shown in the graphical layout.For example the 10.1 inch tablet would go into the xlarge folder.The 7 inch tablet would go into the layout-large.What about devices of other sizes?How to be sure which goes into which?Is there any scale for it?Please help!

Achuthan M
  • 187
  • 1
  • 1
  • 12
  • Have a read of this [link](http://developer.android.com/guide/practices/screens_support.html). – ChuongPham Nov 25 '14 at 13:21
  • possible duplicate of [Android screen size HDPI, LDPI, MDPI](http://stackoverflow.com/questions/6166677/android-screen-size-hdpi-ldpi-mdpi) – Pratik Butani Nov 25 '14 at 13:40

3 Answers3

2

You're most likely over-thinking this. What kind of app are you making exactly?

Just to put things in perspective, below are the official size distributions as of November 3rd, 2014.

pie chart showing that 81.4% of the android devices that frequent google play are of the normal size

And even then, if you follow best practices, it's not a given that a normal layout can't work for other sizes. It's just something that you need to test for, just in case the end result at different sizes doesn't look quite right to you.

Stephan Branczyk
  • 9,363
  • 2
  • 33
  • 49
0

You can use:

  • res/layout – def
  • res/layout-small res/layout-normal
  • res/layout-large
  • res/layout-xlarge

Or:

  • res/layout-sw200dp
  • res/layout-sw600dp
  • res/layout-sw800dp

sw - smallest width

You can read about this here

0

The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch). For example, a "low" density screen has fewer pixels within a given physical area, compared to a "normal" or "high" density screen. so basically i use to design the application for the simple layout file and using the Relative layout it fits for all the screen sizes when you adjust the weight of the view as

android:weight="0.40"

this fits for all the screens according to their screen weights. so try using relative layout and use weight.

Fatti Khan
  • 1,543
  • 1
  • 11
  • 19