I created layout and layout-land folders, in Manifest i have
android:configChanges="keyboardHidden|orientation"
If i remove the android:configChanges from the Manifest I can see the layout change from portrait to landscape…the problem is that the previous screens are destroyed when trying to go back.
I am assuming i could add some code in my Java to tell it when to change layouts. I have read a bunch of posts already but am confused where in the code it would happen.
I am trying to use some prepackaged code because I am new to Android. The link below is the Java code for the menu screen in particular i need to change layouts for. thanks so much!!
Adding
android:configChanges="keyboardHidden|orientation"will stop re-creation of your Activity and also prevent from changing the layout to layout-land/portrait layout. In that case you have to manage it manually from the java code. If youdon'twant yourActivityto getre-createdwhen you rotate your device/ change orientation. What you can do is just change the layout when your screen orientation changes inside onConfigurationChanged() method,Check my answer here, how can that be done.