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

Unspecified

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.

Behind

The same orientation as the activity that’s immediately beneath it in the activity stack.

Landscape

Landscape orientation (the display is wider than it is tall).

Portrait

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

ReverseLandscape

Landscape orientation in the opposite direction from normal landscape.

Added in API level 9.

ReversePortrait

Portrait orientation in the opposite direction from normal portrait.

Added in API level 9.

SensorLandscape

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.

SensorPortrait

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.

UserLandscape

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.

UserPortrait

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.

Sensor

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.

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.

Nosensor

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.

User

The user’s current preferred orientation.

FullUser

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.

Locked

Locks the orientation to its current rotation, whatever that is.

Added in API level 18.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.