Enum android_manifest::ScreenOrientation [−][src]
pub enum ScreenOrientation {
Show variants
Unspecified,
Behind,
Landscape,
Portrait,
ReverseLandscape,
ReversePortrait,
SensorLandscape,
SensorPortrait,
UserLandscape,
UserPortrait,
Sensor,
FullSensor,
Nosensor,
User,
FullUser,
Locked,
}Expand description
The orientation of the activity’s display on the device.
Variants
The default value. The system chooses the orientation. The policy it uses, and
therefore the choices made in specific contexts, may differ from device to
device.
The same orientation as the activity that’s immediately beneath it in the activity stack.
Landscape orientation (the display is wider than it is tall).
Portrait orientation (the display is taller than it is wide).
Landscape orientation in the opposite direction from normal landscape.
Added in API level 9.
Portrait orientation in the opposite direction from normal portrait.
Added in API level 9.
Landscape orientation, but can be either normal or reverse landscape based on the device sensor. The sensor is used even if the user has locked sensor-based rotation.
Added in API level 9.
Portrait orientation, but can be either normal or reverse portrait based on the device sensor. The sensor is used even if the user has locked sensor-based rotation.
Added in API level 9.
Landscape orientation, but can be either normal or reverse landscape based on the device sensor and the user’s preference.
Added in API level 18.
Portrait orientation, but can be either normal or reverse portrait based on the device sensor and the user’s preference.
Added in API level 18.
The orientation is determined by the device orientation sensor. The orientation of
the display depends on how the user is holding the device; it changes when the
user rotates the device. Some devices, though, will not rotate to all four
possible orientations, by default. To allow all four orientations, use
“fullSensor” The sensor is used even if the user locked sensor-based rotation.
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.
The orientation is determined without reference to a physical orientation sensor. The sensor is ignored, so the display will not rotate based on how the user moves the device.
The user’s current preferred orientation.
If the user has locked sensor-based rotation, this behaves the same as user,
otherwise it behaves the same as fullSensor and allows any of the 4 possible
screen orientations.
Added in API level 18.
Locks the orientation to its current rotation, whatever that is.
Added in API level 18.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
fn serialize_attributes(
&self,
source_attributes: Vec<OwnedAttribute>,
source_namespace: Namespace
) -> Result<(Vec<OwnedAttribute>, Namespace), String>[src]Auto Trait Implementations
impl RefUnwindSafe for ScreenOrientationimpl Send for ScreenOrientationimpl Sync for ScreenOrientationimpl Unpin for ScreenOrientationimpl UnwindSafe for ScreenOrientationBlanket Implementations
Mutably borrows from an owned value. Read more