Get phone orientation but fix screen orientation to portrait
Here is a multi-purpose class for easily managing screen orientation changes: public class OrientationManager extends OrientationEventListener { public enum ScreenOrientation { REVERSED_LANDSCAPE, LANDSCAPE, PORTRAIT, REVERSED_PORTRAIT } public ScreenOrientation screenOrientation; private OrientationListener listener; public OrientationManager(Context context, int rate, OrientationListener listener) { super(context, rate); setListener(listener); } public OrientationManager(Context context, int rate) { super(context, rate); } public OrientationManager(Context … Read more