landscape layout does not change on orientation change and portain layout does not change in orientation change

StackOverflow https://stackoverflow.com/questions/21977707

Question

i have two layouts here one is portrait and one is landscape the landscape is located in the layout-land folder and the the portrait is located in the layout folder both have the same name. what i want to do here is that when the emulator screen is portrait it will load portrait and when the screen is landscape it will load a landscape layout but it is not happening when the first view is portrait and when i change orientation it still loads the portrait layout in landscape view and when its landscape first and i change orientation to portrait it loads the landscape layout on portrait screen what seems to be the problem here.

portrait code: http://pastebin.com/QSVL2MHf
landscape code: http://pastebin.com/ktGAe0QX

Was it helpful?

Solution

Remove android:configChanges="orientation" in your AndroidManifest.xml section for this particular Activity.

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