I currently have 2 layout folders: layout-sw480dp and layout-sw720dp, both containing main.xml
I see that dev guide states the following:
- 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).
I’m developing using my Nexus 7 (emulator is a bit sucky/slow), when I upload my app to my tablet, I can tell it uses layout-sw480dp, but why? Ok it’s not a 10″ tablet but the Nexus 7 does have 800×1280 res, which I guess is irrelevant? I’m just a little confused as to which swdp to have.
According to GSMArena: http://www.gsmarena.com/asus_google_nexus_7-4850.php
- 800 x 1280 pixels, 7.0 inches (~216 ppi pixel density)
Its
sw600dpwhich is smallest width 600 dp units not pixels so your code is behaving correctly. The screen is 600 x 961 dp units.Refer to this post for a detailed explanation –
https://plus.google.com/105051985738280261832/posts/6eWwQvFGLV8