Do I need 14 different layouts to support all Android devices? Do I need 14 different layouts to support all Android devices? android android

Do I need 14 different layouts to support all Android devices?


Your app will work on 100% of the devices with the classic layout.

You can just add some buttons or change the layout in landscape mode by adding some qualifiers but that's up to you!

For instance, on LDPI (small resolution) device, you may want to adjust some buttons or change a little bit to fit the small screen.

You may also want to put some buttons on the right in landscape mode and in the bottom of your layout in portrait!

You do not "have to" use them.


According to Android Dev Protip from Roman Nurik about screen size qualifiers:

If you have custom layouts for larger screen devices such as tablets, now's the time to stop using the -large or -xlarge resource qualifier and switch to using -swXXdp or -wXXdp qualifiers. The latter were introduced in API level 13, which basically all tablets now have support for according to the latest platform version charts1.

means that for basically all cases where -large would have any effect, -swXXdp can be used instead to provide more granularity.

So which actual sw or w qualifiers should you use? Here's a quick just-give-me-something starting point:

7" tablets: Instead of layout-large, use layout-sw600dp.

Example: Nexus 7 = 960×600 dp; the smaller of the two dimensions is 600.

10" tablets: Instead of layout-xlarge, use layout-sw720dp.

Example: Nexus 10 = 1280×800 dp; the smaller of the two dimensions is 800. Some 10" tablets are a bit more narrow so 720 is a commonly used switching point.

There's more to it than just that (you really want to choose switching points based on your content's minimum requirements, not on device form factor), but that's a #Protip for another day (::cough:: +Nick Butcher ::cough::).


In the layout if you do not use AbsoluteLayout, you application is going to be resized to fit the screen.

But in some cases, for smaller screens you need declare a new layout with less components for example.

For images:

You has some options.

Simple ignore some resolutions and let the device choose the best image to it.Declare on AndroidManifest for wich sizes you want to support.Or has just one and let the resize screw your application.