Jelly Bean 4.3 (API 18) added a couple new screenOrientation values.
http://developer.android.com/reference/android/R.attr.html#screenOrientation
I suppose first: is there a difference between "orientation" and "rotation"? Or is the documentation just using inconsistent wording?
Then:
unspecified
No preference specified: let the system decide the best orientation. This will either be the orientation selected by the activity below, or the user's preferred orientation if this activity is the bottom of a task. If the user explicitly turned off sensor based orientation through settings sensor based device rotation will be ignored. If not by default sensor based orientation will be taken into account and the orientation will changed based on how the user rotates the device. Corresponds to SCREEN_ORIENTATION_UNSPECIFIED.
user
Use the user's current preferred orientation of the handset. Corresponds to SCREEN_ORIENTATION_USER.
fullUser (New)
Respect the user's sensor-based rotation preference, but if sensor-based rotation is enabled then allow the screen to rotate in all 4 possible directions regardless of what the device will normally do (for example some devices won't normally use 180 degree rotation). Corresponds to SCREEN_ORIENTATION_FULL_USER.
What's the difference? In practice currently, I believe that setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
is the way to tell the activity to rotate based on the sensor, if Rotation is enabled system-wide. So then how is fulluser
different?
Likewise,
nosensor
Always ignore orientation determined by orientation sensor: the display will not rotate when the user moves the device. Corresponds to SCREEN_ORIENTATION_NOSENSOR.
locked (New)
Screen is locked to its current rotation, whatever that is. Corresponds to SCREEN_ORIENTATION_LOCKED.
Any difference?