You can also use:
getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE
More Related Contents:
- Background task, progress dialog, orientation change – is there any 100% working solution?
- Android: alternate layout xml for landscape mode
- Android – Camera preview is sideways
- Force “portrait” orientation mode
- How do I specify different layouts for portrait and landscape orientations?
- How to set Android camera orientation properly?
- Strange behavior with android orientation sensor
- Android WebView: handling orientation changes
- Lock screen orientation (Android) [duplicate]
- Images taken with ACTION_IMAGE_CAPTURE always returns 1 for ExifInterface.TAG_ORIENTATION on some Gingerbread devices
- Screen orientation lock
- Android Fragment lifecycle over orientation changes
- How can I globally force screen orientation in Android?
- Camera orientation issue in Android
- android camera surfaceview orientation
- How to lock orientation during runtime
- Android, how to not destroy the activity when I rotate the device?
- Summary: Take a picture utilizing Camera Intent and display the photo with correct orientation (works on hopefully all devices)
- Save data and change orientation
- How should I calculate azimuth, pitch, orientation when my Android device isn’t flat?
- Android phone orientation overview including compass
- android screen orientation
- Setting the orientation for only 1 fragment in my activity while the rest is in portrait
- Is there a way to retrieve multiple sensor data in Android
- Sending text messages programmatically in android
- Continuous Speech Recognition Android
- What are the differences among Internal storage, external storage, sd card and removable storage?
- Unable to Merge Dex – Android Studio 3.0
- How to get Android AVD name from adb device name
- How to enable Location access programmatically in android?