landscape layout does not change on orientation ch

2019-06-07 00:45发布

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

1条回答
成全新的幸福
2楼-- · 2019-06-07 01:24

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

查看更多
登录 后发表回答