Reputation: 1
I am developing an App, and I want whenever the user change the orientation of the device I display the current orientation of the device. Actually, I achieved this step, but when i rotate the device to be in REVERSE_PORTRAIT
the screen does not obey the rotation, in other words, my screen can not be in the REVERSE_PORTRAIT
.
In the manifest file, I changed the value of android:ScreenOrientation
to be user
, but still in the same problem, all the three orientations PORTRAIT
, LANDSCAPE
and REVERSE_LANDSCAPE
are detectable EXCEPT REVERSE_PORTRAIT
How can I find a solution for this problem?
Upvotes: 1
Views: 45
Reputation: 1206
You can try to use fullSensor if you want every possible orientation
"fullSensor" The orientation is determined by the device orientation sensor for any of the 4 orientations. This is similar to "sensor" except this allows any of the 4 possible screen orientations, regardless of what the device will normally do (for example, some devices won't normally use reverse portrait or reverse landscape, but this enables those). Added in API level 9.
all the possible values for screenOrientation and some explanations are here : http://developer.android.com/guide/topics/manifest/activity-element.html
Upvotes: 2