Question

I'm busy developing an android application by making use of Xamarin and Visual Studio. I have created the following folder structure:

res/layout/main_activity.xml           # For phones
res/layout-sw600dp/main_activity.xml   # For 7” tablets
res/layout-sw720dp/main_activity.xml   # For 10” tablets

For the various layouts, but this does not seem to be working. It keeps showing the xml file which is located in the res/layout/ folder?

Any help would be appreciated! Many thanks in advance!

Was it helpful?

Solution

Low density Small screens QVGA 240x320

layout-small-ldpi layout-small-land-ldpi

Low density Normal screens WVGA400 240x400 (x432)

layout-ldpi layout-land-ldpi

Medium density Normal screens HVGA 320x480

layout-mdpi layout-land-mdpi

Medium density Large screens HVGA 320x480

layout-large-mdpi layout-large-land-mdpi

High density Normal screens WVGA800 480x800 (x854)

layout-hdpi layout-land-hdpi

Xoom (medium density large but 1280x800 res)

layout-xlarge layout-xlarge-land

OTHER TIPS

Note: The sizes that you specify using these qualifiers are not the actual screen sizes. Rather, the sizes are for the width or height in dp units that are available to your activity's window. The Android system might use some of the screen for system UI (such as the system bar at the bottom of the screen or the status bar at the top), so some of the screen might not be available for your layout. Thus, the sizes you declare should be specifically about the sizes needed by your activity—the system accounts for any space used by system UI when declaring how much space it provides for your layout. Also beware that the Action Bar is considered a part of your application's window space, although your layout does not declare it, so it reduces the space available for your layout and you must account for it in your design.

http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top