Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between screenOrientation portrait and userPortrait

I need know the real difference of screen orientation userPortrait and portrait. When to use what?

When this?

 android:screenOrientation="portrait"

When this?

 android:screenOrientation="userPortrait"
like image 673
Libin Avatar asked Apr 29 '14 17:04

Libin


People also ask

What is fullSensor orientation android?

Try this: android:screenOrientation="fullSensor" The orientation is determined by the device orientation sensor. The orientation of the display depends on how the user is holding the device. This should be what you want. Also for more options check out this link-Activity Element.

What is the work of lock orientation?

If there is a scenario where you need your entire application to be in portrait mode or landscape mode or one of the Activity should be in portrait mode and all the other activities should be set at auto screen orientation, then here this article makes you do that in simple steps.


1 Answers

"portrait"  Portrait orientation (the display is taller than it is wide).

and

"userPortrait"  

Portrait orientation, but can be either normal or reverse portrait based on the device sensor and the user's sensor preference. If the user has locked sensor-based rotation, this behaves the same as portrait, otherwise it behaves the same as sensorPortrait. Added in API level 18.

check http://developer.android.com/guide/topics/manifest/activity-element.html

like image 147
Sajad Karuthedath Avatar answered Oct 17 '22 19:10

Sajad Karuthedath