The xml is not switching when device orientation change

Posted by Labeeb P on Stack Overflow See other posts from Stack Overflow or by Labeeb P
Published on 2010-12-28T07:57:34Z Indexed on 2011/01/06 5:53 UTC
Read the original article Hit count: 220

Hi,
I have made two folders, res/layout and res/layout-land

The output i got
If I start the application in portrait mode, it will always use the xml in layout folder if the application run in portrait mode. And will not use xml in layout-land if i change the device to landscape mode
If it start in landscape mode it only use the xml in layout-land
The xml is not switching when the orientation change

What i expect was
It should use the xml in layout folder while it is in portrait mode and use the xml in layout-land while in landscape mode

In the Manifest file i have added android:configChanges="orientation" for the activity and

<supports-screens 
        android:resizeable="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:anyDensity="true" />

Did i missed any thing here? What changes i need to do here?
Thank You

© Stack Overflow or respective owner

Related posts about android

Related posts about configuration