Configuration Class

Definition

This class describes all device configuration information that can impact the resources the application retrieves.

[Android.Runtime.Register("android/content/res/Configuration", DoNotGenerateAcw=true)]
public sealed class Configuration : Java.Lang.Object, Android.OS.IParcelable, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.IComparable
[<Android.Runtime.Register("android/content/res/Configuration", DoNotGenerateAcw=true)>]
type Configuration = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface IComparable
Inheritance
Configuration
Attributes
Implements

Remarks

Java documentation for android.content.res.Configuration.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

Configuration()

Construct an invalid Configuration.

Configuration(Configuration)

Construct an invalid Configuration.

Fields

ColorModeHdrMask
Obsolete.

Constant for #colorMode: bits that encode the dynamic range of the screen.

ColorModeHdrNo
Obsolete.

Constant for #colorMode: a #COLOR_MODE_HDR_MASK value indicating that the screen is not HDR (low/standard dynamic range).

ColorModeHdrShift
Obsolete.

Constant for #colorMode: bits shift to get the screen dynamic range.

ColorModeHdrUndefined
Obsolete.

Constant for #colorMode: a #COLOR_MODE_HDR_MASK value indicating that it is unknown whether or not the screen is HDR.

ColorModeHdrYes
Obsolete.

Constant for #colorMode: a #COLOR_MODE_HDR_MASK value indicating that the screen is HDR (dynamic range).

ColorModeUndefined
Obsolete.

Constant for #colorMode: a value indicating that the color mode is undefined

ColorModeWideColorGamutMask
Obsolete.

Constant for #colorMode: bits that encode whether the screen is wide gamut.

ColorModeWideColorGamutNo
Obsolete.

Constant for #colorMode: a #COLOR_MODE_WIDE_COLOR_GAMUT_MASK value indicating that the screen is not wide gamut.

ColorModeWideColorGamutUndefined
Obsolete.

Constant for #colorMode: a #COLOR_MODE_WIDE_COLOR_GAMUT_MASK value indicating that it is unknown whether or not the screen is wide gamut.

ColorModeWideColorGamutYes
Obsolete.

Constant for #colorMode: a #COLOR_MODE_WIDE_COLOR_GAMUT_MASK value indicating that the screen is wide gamut.

DensityDpiUndefined

Default value for #densityDpi indicating that no width has been specified.

FontWeightAdjustmentUndefined

An undefined fontWeightAdjustment.

MncZero

Constant used to to represent MNC (Mobile Network Code) zero.

ScreenHeightDpUndefined
Obsolete.

Default value for #screenHeightDp indicating that no width has been specified.

ScreenWidthDpUndefined
Obsolete.

Default value for #screenWidthDp indicating that no width has been specified.

SmallestScreenWidthDpUndefined

Default value for #smallestScreenWidthDp indicating that no width has been specified.

UiModeNightMask
Obsolete.

Constant for #uiMode: bits that encode the night mode.

UiModeNightNo
Obsolete.

Constant for #uiMode: a #UI_MODE_NIGHT_MASK value that corresponds to the <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

UiModeNightUndefined
Obsolete.

Constant for #uiMode: a #UI_MODE_NIGHT_MASK value indicating that no mode type has been set.

UiModeNightYes
Obsolete.

Constant for #uiMode: a #UI_MODE_NIGHT_MASK value that corresponds to the <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

UiModeTypeAppliance
Obsolete.

Constant for #uiMode: a #UI_MODE_TYPE_MASK value that corresponds to the <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

UiModeTypeCar
Obsolete.

Constant for #uiMode: a #UI_MODE_TYPE_MASK value that corresponds to the <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

UiModeTypeDesk
Obsolete.

Constant for #uiMode: a #UI_MODE_TYPE_MASK value that corresponds to the <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

UiModeTypeMask
Obsolete.

Constant for #uiMode: bits that encode the mode type.

UiModeTypeNormal
Obsolete.

Constant for #uiMode: a #UI_MODE_TYPE_MASK value that corresponds to <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

UiModeTypeTelevision
Obsolete.

Constant for #uiMode: a #UI_MODE_TYPE_MASK value that corresponds to the <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

UiModeTypeUndefined
Obsolete.

Constant for #uiMode: a #UI_MODE_TYPE_MASK value indicating that no mode type has been set.

UiModeTypeVrHeadset
Obsolete.

Constant for #uiMode: a #UI_MODE_TYPE_MASK value that corresponds to the <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

UiModeTypeWatch
Obsolete.

Constant for #uiMode: a #UI_MODE_TYPE_MASK value that corresponds to the <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
ColorMode
Creator
DensityDpi

The target screen density being rendered to, corresponding to <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

FontScale

Current user preference for the scaling factor for fonts, relative to the base density scaling.

FontWeightAdjustment

Adjustment in text font weight.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
HardKeyboardHidden

A flag indicating whether the hard keyboard has been hidden.

IsNightModeActive

Retuns whether the configuration is in night mode

IsScreenHdr

Return whether the screen has a high dynamic range.

IsScreenRound

Return whether the screen has a round shape.

IsScreenWideColorGamut

Return whether the screen has a wide color gamut and wide color gamut rendering is supported by this device.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Keyboard

The kind of keyboard attached to the device.

KeyboardHidden

A flag indicating whether any keyboard is available.

LayoutDirection

Return the layout direction.

Locale
Obsolete.

Current user preference for the locale, corresponding to <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

Locales

Get the locale list. -or- Set the locale list.

Mcc

IMSI MCC (Mobile Country Code), corresponding to <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

Mnc

IMSI MNC (Mobile Network Code), corresponding to <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

Navigation

The kind of navigation method available on the device.

NavigationHidden

A flag indicating whether any 5-way or DPAD navigation available.

Orientation

Overall orientation of the screen.

PeerReference (Inherited from Object)
ScreenHeightDp

The current height of the available screen space, in dp units, corresponding to <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

ScreenLayout

Bit mask of overall layout of the screen.

ScreenWidthDp

The current width of the available screen space, in dp units, corresponding to <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

SmallestScreenWidthDp

The smallest screen size an application will see in normal operation, corresponding to <a href="[TODO: @docRoot]guide/topics/resources/providing-resources.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
Touchscreen

The kind of touch screen attached to the device.

UiMode

Bit mask of the ui mode.

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CompareTo(Configuration)
DescribeContents()

Parcelable methods

Diff(Configuration)

Return a bit mask of the differences between this Configuration object and the given one.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Configuration)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
IsLayoutSizeAtLeast(Int32)

Check if the Configuration's current #screenLayout is at least the given size.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
NeedNewResources(ConfigChanges, ConfigChanges)

Determines if a new resource needs to be loaded from the bit set of configuration changes returned by #updateFrom(Configuration).

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
ReadFromParcel(Parcel)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetLayoutDirection(Locale)

Set the layout direction from a Locale.

SetLocale(Locale)

Set the locale list to a list of just one locale.

SetTo(Configuration)

Sets the fields in this object to those in the given Configuration.

SetToDefaults()

Set this object to the system defaults.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
UpdateFrom(Configuration)

Copies the fields from delta into this Configuration object, keeping track of which ones have changed.

Wait()

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

(Inherited from Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

Flatten this object in to a Parcel.

Explicit Interface Implementations

IComparable.CompareTo(Object)
IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to