app/src/main/java/com/quintessential/gypsy/CameraHelper.java
// If you quickly rotate 180 degrees, Activity does not restart, so you need this orientation Listener.
If you quickly rotate 180 degrees, Activity does not restart, so you need this orientation Listener.
If you quickly rotate 180 degrees Activity does not restart so you need this orientation Listener .
@Override
        public void onOrientationChanged(int orientation) {
            if (display.getRotation() != displayRotation) {
                displayRotation = display.getRotation();
                setCameraDisplayOrientation();
            }
        }
@ Override public void onOrientationChanged ( int orientation ) { if ( display . getRotation ( ) != displayRotation ) { displayRotation = display . getRotation ( ) ; setCameraDisplayOrientation ( ) ; } }
If you quickly rotate 180 degrees, Activity does not restart, so you need this orientation Listener.
If you quickly rotate 180 degrees Activity does not restart so you need this orientation Listener .
// this method gets called for every tiny 1 degree change in orientation, so it's called really often // if the device is handheld. We don't need to reset the camera display orientation unless there // is a change to the display rotation (i.e. a 90/180/270 degree switch).