Android - Detect The Phone Orientation « Eureka! - 0 views
-
// Get display for detecting the phone orientation display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay(); // Get the orientation int orientation = display.getOrientation();
-
android.view.Display class provide a simple way to determine the phone orientation.