I want to make an action that allows you to change the orientation in some state, but not otherwise. More precisely, I want to prevent a restart of activity when the background thread is busy.
I put the attribute configChangesin the manifest of activity, and onConfigurationChangedis called when the orientation changes. However, I want to allow the application to change orientation , if allowed .
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
if (orientationChangeAllowed) {
} else {
}
}
source
share