|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.content.res.Configuration
public final class Configuration
This class describes all device configuration information that can impact the resources the application retrieves. This includes both user-specified configuration options (locale and scaling) as well as dynamic device configuration (various types of input devices).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface android.os.Parcelable |
|---|
Parcelable.Creator<T> |
| Field Summary | |
|---|---|
static Parcelable.Creator<Configuration> |
CREATOR
|
float |
fontScale
Current user preference for the scaling factor for fonts, relative to the base density scaling. |
int |
keyboard
The kind of keyboard attached to the device. |
static int |
KEYBOARD_12KEY
|
static int |
KEYBOARD_NOKEYS
|
static int |
KEYBOARD_QWERTY
|
static int |
KEYBOARD_UNDEFINED
|
int |
keyboardHidden
A flag indicating whether the keyboard has been hidden. |
static int |
KEYBOARDHIDDEN_NO
|
static int |
KEYBOARDHIDDEN_UNDEFINED
|
static int |
KEYBOARDHIDDEN_YES
|
Locale |
locale
Current user preference for the locale. |
int |
mcc
IMSI MCC (Mobile Country Code). |
int |
mnc
IMSI MNC (Mobile Network Code). |
int |
navigation
The kind of navigation method available on the device. |
static int |
NAVIGATION_DPAD
|
static int |
NAVIGATION_NONAV
|
static int |
NAVIGATION_TRACKBALL
|
static int |
NAVIGATION_UNDEFINED
|
static int |
NAVIGATION_WHEEL
|
int |
orientation
Overall orientation of the screen. |
static int |
ORIENTATION_LANDSCAPE
|
static int |
ORIENTATION_PORTRAIT
|
static int |
ORIENTATION_SQUARE
|
static int |
ORIENTATION_UNDEFINED
|
int |
touchscreen
The kind of touch screen attached to the device. |
static int |
TOUCHSCREEN_FINGER
|
static int |
TOUCHSCREEN_NOTOUCH
|
static int |
TOUCHSCREEN_STYLUS
|
static int |
TOUCHSCREEN_UNDEFINED
|
| Fields inherited from interface android.os.Parcelable |
|---|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE |
| Constructor Summary | |
|---|---|
Configuration()
Construct an invalid Configuration. |
|
Configuration(Configuration o)
Makes a deep copy suitable for modification. |
|
| Method Summary | |
|---|---|
int |
compareTo(Configuration that)
Returns an integer indicating the relative positions of the receiver and the argument in the natural order of elements of the receiver's class. |
int |
describeContents()
Parcelable methods |
int |
diff(Configuration delta)
Return a bit mask of the differences between this Configuration object and the given one. |
boolean |
equals(Configuration that)
|
boolean |
equals(Object that)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. |
int |
hashCode()
Returns an integer hash code for the receiver. |
void |
makeDefault()
Deprecated. |
static boolean |
needNewResources(int configChanges,
int interestingChanges)
Determine if a new resource needs to be loaded from the bit set of configuration changes returned by updateFrom(Configuration). |
void |
setToDefaults()
Set this object to the system defaults. |
String |
toString()
Returns a string containing a concise, human-readable description of the receiver. |
int |
updateFrom(Configuration delta)
Copy the fields from delta into this Configuration object, keeping track of which ones have changed. |
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public float fontScale
public int mcc
public int mnc
public Locale locale
public static final int TOUCHSCREEN_UNDEFINED
public static final int TOUCHSCREEN_NOTOUCH
public static final int TOUCHSCREEN_STYLUS
public static final int TOUCHSCREEN_FINGER
public int touchscreen
TOUCHSCREEN_NOTOUCH, TOUCHSCREEN_STYLUS,
TOUCHSCREEN_FINGER.
public static final int KEYBOARD_UNDEFINED
public static final int KEYBOARD_NOKEYS
public static final int KEYBOARD_QWERTY
public static final int KEYBOARD_12KEY
public int keyboard
KEYBOARD_QWERTY, KEYBOARD_12KEY.
public static final int KEYBOARDHIDDEN_UNDEFINED
public static final int KEYBOARDHIDDEN_NO
public static final int KEYBOARDHIDDEN_YES
public int keyboardHidden
public static final int NAVIGATION_UNDEFINED
public static final int NAVIGATION_NONAV
public static final int NAVIGATION_DPAD
public static final int NAVIGATION_TRACKBALL
public static final int NAVIGATION_WHEEL
public int navigation
NAVIGATION_DPAD, NAVIGATION_TRACKBALL,
NAVIGATION_WHEEL.
public static final int ORIENTATION_UNDEFINED
public static final int ORIENTATION_PORTRAIT
public static final int ORIENTATION_LANDSCAPE
public static final int ORIENTATION_SQUARE
public int orientation
ORIENTATION_LANDSCAPE, ORIENTATION_PORTRAIT,
or ORIENTATION_SQUARE.
public static final Parcelable.Creator<Configuration> CREATOR
| Constructor Detail |
|---|
public Configuration()
setToDefaults()
for this object to be valid.
public Configuration(Configuration o)
| Method Detail |
|---|
public String toString()
Object
toString in class Objectpublic void setToDefaults()
@Deprecated public void makeDefault()
public int updateFrom(Configuration delta)
diff(android.content.res.Configuration).public int diff(Configuration delta)
PackageManager.ActivityInfo.CONFIG_FONT_SCALE,
PackageManager.ActivityInfo.CONFIG_MCC,
PackageManager.ActivityInfo.CONFIG_MNC,
PackageManager.ActivityInfo.CONFIG_LOCALE,
PackageManager.ActivityInfo.CONFIG_TOUCHSCREEN,
PackageManager.ActivityInfo.CONFIG_KEYBOARD,
PackageManager.ActivityInfo.CONFIG_NAVIGATION, or
PackageManager.ActivityInfo.CONFIG_ORIENTATION.
public static boolean needNewResources(int configChanges,
int interestingChanges)
updateFrom(Configuration).
configChanges - The mask of changes configurations as returned by
updateFrom(Configuration).interestingChanges - The configuration changes that the resource
can handled, as given in TypedValue.changingConfigurations.
public int describeContents()
describeContents in interface Parcelable
public void writeToParcel(Parcel dest,
int flags)
Parcelable
writeToParcel in interface Parcelabledest - The Parcel in which the object should be written.flags - Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.public int compareTo(Configuration that)
Comparable
compareTo in interface Comparable<Configuration>that - Object an object to compare the receiver to
public boolean equals(Configuration that)
public boolean equals(Object that)
Object
equals in class Objectthat - Object the object to compare with this object.
true if the object is the same as this
object false if it is different from this object.Object.hashCode()public int hashCode()
Objecttrue when passed to .equals must
answer the same value for this method.
hashCode in class ObjectObject.equals(java.lang.Object)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||