Created
June 21, 2013 06:34
-
-
Save gnuton/5829298 to your computer and use it in GitHub Desktop.
Get orientation on Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay(); | |
int rotation = display.getRotation(); | |
Log.d(TAG, "Orientation " + rotation); | |
If in portrait mode | |
if (rotation == Surface.ROTATION_180 || rotation == Surface.ROTATION_0 )*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment