I can’t understand why setting the sensorPortrait attribute in the manifest for the activity does not work to allow the activity to switch to the reverse portrait. This is how I set the manifest
<activity android:name=".MainActivty" android:label="Testing" android:screenOrientation="sensorPortrait" android:windowSoftInputMode="stateHidden" android:configChanges="orientation"> </activity>
This code does not work for me to get both a reverse portrait and a portrait on Moto E (4.4.4) or Galaxy S3 (4.3), but I can confirm that it works on a Nexus 7 tablet (5.0.1), I tried a few other answers, but this one is probably the simplest and doesn’t seem to work for me on “phones”, do I have enough information that is relevant for this to work?
I tried the following link, which is just as similar as my question, but nothing seems useful for this
Activity only in portrait or reverse portfolio
Currently, with the "sensorPortrait" flag, it behaves exactly the same as the "portrait" setting on phones.
source share