pub enum ConfigChanges {
Show 15 variants Density, FontScale, Keyboard, KeyboardHidden, LayoutDirection, Locale, Mcc, Mnc, Navigation, Orientation, ScreenLayout, ScreenSize, SmallestScreenSize, Touchscreen, UiMode,
}
Expand description

Lists configuration changes that the activity will handle itself.

Variants§

§

Density

The display density has changed — the user might have specified a different display scale, or a different display might now be active. Added in API level 24.

§

FontScale

The font scaling factor has changed — the user has selected a new global font size.

§

Keyboard

The keyboard type has changed — for example, the user has plugged in an external keyboard.

§

KeyboardHidden

The keyboard accessibility has changed — for example, the user hasrevealed the hardware keyboard.

§

LayoutDirection

The layout direction has changed — for example, changing from left-to-right (LTR) to right-to-left (RTL). Added in API level 17.

§

Locale

The locale has changed — the user has selected a new language that text should be displayed in.

§

Mcc

The IMSI mobile country code (MCC) has changed — a SIM has been detected and updated the MCC.

§

Mnc

The IMSI mobile network code (MNC) has changed — a SIM has been detected and updated the MNC.

§

Navigation

The navigation type (trackball/dpad) has changed. (This should never normally happen.)

§

Orientation

The screen orientation has changed — the user has rotated the device.

Note

If your application targets Android 3.2 (API level 13) or higher, then you should also declare the “screenSize” and “screenLayout” configurations, because they might also change when a device switches between portrait and landscape orientations.

§

ScreenLayout

The screen layout has changed — a different display might now be active.

§

ScreenSize

The current available screen size has changed. This represents a change in the currently available size, relative to the current aspect ratio, so will change when the user switches between landscape and portrait. Added in API level 13.

§

SmallestScreenSize

The physical screen size has changed. This represents a change in size regardless of orientation, so will only change when the actual physical screen size has changed such as switching to an external display. A change to this configuration corresponds to a change in the smallestWidth configuration. Added in API level 13

§

Touchscreen

The touchscreen has changed. (This should never normally happen.)

§

UiMode

The user interface mode has changed — the user has placed the device into a desk or car dock, or the night mode has changed. For more information about the different UI modes, see UiModeManager. Added in API level 8.

Trait Implementations§

source§

impl Clone for ConfigChanges

source§

fn clone(&self) -> ConfigChanges

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ConfigChanges

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ConfigChanges

source§

fn default() -> ConfigChanges

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

impl<'de> Deserialize<'de> for ConfigChanges

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<ConfigChanges> for ConfigChanges

source§

fn eq(&self, other: &ConfigChanges) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ConfigChanges

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl YaDeserialize for ConfigChanges

source§

fn deserialize<R: Read>(reader: &mut Deserializer<R>) -> Result<Self, String>

source§

impl YaSerialize for ConfigChanges

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, source_attributes: Vec<OwnedAttribute>, source_namespace: Namespace ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl Eq for ConfigChanges

source§

impl StructuralEq for ConfigChanges

source§

impl StructuralPartialEq for ConfigChanges

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,