I want to get the phone orientation but keep the screen orientation to portrait. So no matter the user turns the phone to landscape or portrait, the view stays the same, but
This is way simpler than writing a whole new class:
final OrientationEventListener orientationEventListener = new OrientationEventListener( getApplicationContext() ) {
@Override
public void onOrientationChanged( final int orientation ) {
Log.i("", "orientation = " + orientation );
}
};
orientationEventListener.enable();