How to know screen Orientation in android, and set screen orientation as your request.
Overall orientation of the screen. May be one of
and full code:
More Details: http://developer.android.com/reference/android/content/res/Configuration.html
Overall orientation of the screen. May be one of
ORIENTATION_LANDSCAPE
, ORIENTATION_PORTRAIT
.
The current configuration, as used to determine which resources to retrieve etc, as available from the Resources' Configuration object as:
getResources().getConfiguration().orientation
public int getScreenOrientation() { Display getOrient = getWindowManager().getDefaultDisplay(); int orientation = Configuration.ORIENTATION_UNDEFINED; if (getOrient.getWidth() == getOrient.getHeight()) { orientation = Configuration.ORIENTATION_SQUARE; } else { if (getOrient.getWidth() < getOrient.getHeight()) { orientation = Configuration.ORIENTATION_PORTRAIT; } else { orientation = Configuration.ORIENTATION_LANDSCAPE; } } return orientation; }all device configuration information that can impact the resources the application retrieves. This includes both user-specified configuration options (locale and scaling) as well as device configurations (such as input modes, screen size and screen orientation).
More Details: http://developer.android.com/reference/android/content/res/Configuration.html
Histogram Equalization OpenCV
ReplyDeleteMatplotlib pie chart
Password hash and verify in PHP
CRUD operations in Python using MySQL
Export data from MySQL table to CSV file using PHP