You just need to go to AndroidManifest.xml and inside or in your action shortcuts, you have to type this line of code, as someone said there:
android:configChanges="orientation|screenSize"
So you will have something like this:
<activity android:name="ActivityMenu"
android:configChanges="orientation|screenSize">
</activity>
Hope this works for you.
There are usually three ways to do this:
, savedInstanceState. onSaveInstanceState onCreate.
, : screenOrientation = "" ( "" ).
, , android: configChanges = "screenOrientation".. , , ( , ).