============ Problem Description ============
As we all know, normally, use int rotation = Mactivity.getwindowmanager (). Getdefaultdisplay (). Getrotation () to get the orientation of the screen rotation.
But the return value of this rotation in the end has and meaning, in the online search a lot of posts, mostly is very vague description of the knowledge is irresponsible reprint.
We look at Getrotation's API description, which includes "Returns the rotation of the screen from its" natural "orientation."
Here Google itself to "natural" quotes, meaning that normal is human-defined, is variable.
For a pad that is a horizontal screen by default, how do I define a horizontal screen by default? After my experiments, I found that the horizontal screen or vertical screen is based on the direction of the camera.
The same is true for vertical screens.
Such as:
============ Solution 1============
You can write your research in a blog post.
A discussion about getrotation in Android.