Question

I need to use my application in both landscape and portrait modes. So i have made two layouts for both modes in two folders folder-layout and folder-layout-land. Now when i turn the phone the layout is switching good but the same layout in landscape mode is not maintained when switching to portrait mode. Some other different layout is getting loaded.

Is there any solution for this. Please share. Thanks in advance.

Was it helpful?

Solution

As you have done everything right to make 2 xml and keep int 2 folders.

i think you just need to write this with your activity declaration in Manifest

android:configChanges="orientation|keyboardHidden"

to handle to configuaration change

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