I have an app with several \'normal\' activities which can run on either landscape or portrait. They are designed for and mostly used on portrait.
This app has one s
This is the way how the stock camera app disables rotation animation:
private void setRotationAnimation() {
int rotationAnimation = WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE;
Window win = getWindow();
WindowManager.LayoutParams winParams = win.getAttributes();
winParams.rotationAnimation = rotationAnimation;
win.setAttributes(winParams);
}
Note: According to API Reference and comment below, this only works:
FLAG_FULLSCREEN flag is set for WindowManager.LayoutParams of the Activity