Android studio layout size folders

Bended picture Bended · Feb 3, 2015 · Viewed 10.6k times · Source

I'm trying to create a different layout for 1080dp and others using "layout-sw1080dp" folder but it seems android studio completely ignores it and loads from the default layout folder.

I've tried another way - setting different dimensions using values-sw1080dp and still nothing!

What is the correct way to write different layouts for different screen sizes?

Answer

Budius picture Budius · Feb 3, 2015

DP is not the same as PIXEL!!!

You think it's ignoring because devices with 1080dp do not exist (yet?).

  • values-sw720dp: that's for Nexus 9 and 10 inch tablets
  • values-sw600dp: that's for 7 to 8 inch tablets
  • values-sw360dp: that's for small phones

I suggest you installing this app https://play.google.com/store/apps/details?id=nl.qbus.sizemeup&hl=en on your devices, it shows the size of each devive in pixels and in DP.

Also, read more about it here http://developer.android.com/guide/practices/screens_support.html