Question

Is there a way to get the device orientation in Android even if the interface orientation remains the same? I turn the device 180 degrees, the UI is upside down. But I still want to be notified.

Was it helpful?

Solution

You should set up an OrientationEventListener in the Activity you want to be notified of changes in.

Then you will have to specify the desired ScreenOrientation in the manifest for that Activity to prevent the screen from rotating.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top