I understand that there are a couple of other posts on this topic, however the solutions for these posts do not work for me.
Basically, I want to stop my activity after restarting when the device orientation changes. To do this, I changed the action in the manifest file:
<activity android:name=".MyActivity" android:configChanges="orientation|keyboardHidden"></activity>
and I redefined onConfigurationChanged() in my work:
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); System.out.println("IN onConfigurationChanged()"); }
However, activity still restarts when the orientation changes, and the onConfigurationChanged() method is not called.
Does anyone know why this might happen?
java android android-activity orientation
littleK
source share