On Fri, Apr 13, 2012 at 9:12 AM, kodlan <[email protected]> wrote: > This drives me nuts. I'm developing application where I need to > provide both tablet layout and simpler layout for phones. I'm > targeting 4.0. After reading this > http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts > I'm totally lost how that should be done. > > For example I have two devices Samsung Nexus (720x1280, xhdpi, > ~315-320dpi) and Motorola Xoom (1280x800, mdpi, 160dpi). > > How can I correctly apply tablet layout for xoom and phone layout for > nexus?! > Using smallestWidth (-swXXXdp) or Available screen width (-wXXXp) for > this seems to be wrong, as > screen size (landscape for both) in dips for nexus is greater that for > nexus.
Your last sentence does not parse. The screen size for the Galaxy Nexus is 320dp x 640dp. The screen size for the XOOM is 800dp x 1280dp. So, either use the classic res/layout/ and res/layout-xlarge/ pair, or use something like res/layout/ and res/layout-w720dp/ (or wherever you think you want to have your break point). Personally, I would just use res/layout/ and res/layout-xlarge/, with -land added as needed. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 4.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

