|
Build 1.1_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 |
hardKeyboardHidden
A flag indicating whether the hard keyboard has been hidden. |
static int |
HARDKEYBOARDHIDDEN_NO
|
static int |
HARDKEYBOARDHIDDEN_UNDEFINED
|
static int |
HARDKEYBOARDHIDDEN_YES
|
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 any keyboard is available. |
static int |
KEYBOARDHIDDEN_NO
|
static int |
KEYBOARDHIDDEN_SOFT
Constant matching actual resource implementation. |
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
|
boolean |
userSetLocale
Locale should persist on setting |
| 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)
Compares this object to the specified object to determine their relative order. |
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 this instance with the specified object and indicates if they are equal. |
int |
hashCode()
Returns an integer hash code for this object. |
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 this object. |
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 boolean userSetLocale
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 static final int KEYBOARDHIDDEN_SOFT
public int keyboardHidden
hardKeyboardHidden, this also takes into account a soft
keyboard, so if the hard keyboard is hidden but there is soft
keyboard available, it will be set to NO. Value is one of:
KEYBOARDHIDDEN_NO, KEYBOARDHIDDEN_YES.
public static final int HARDKEYBOARDHIDDEN_UNDEFINED
public static final int HARDKEYBOARDHIDDEN_NO
public static final int HARDKEYBOARDHIDDEN_YES
public int hardKeyboardHidden
HARDKEYBOARDHIDDEN_NO, HARDKEYBOARDHIDDEN_YES.
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()
ObjectObject.hashCode(),
that is, it is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
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 - the object to compare to this instance.
another;
a positive integer if this instance is greater than
another; 0 if this instance has the same order as
another.public boolean equals(Configuration that)
public boolean equals(Object that)
Objecto must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be both transitive and reflexive.
The implementation in Object returns true only if o is the exact same object as the receiver (using the == operator for
comparison). Subclasses often implement equals(Object) so that
it takes into account the two object's types and states.
The general contract for the equals(Object) and Object.hashCode() methods is that if equals returns true for
any two objects, then hashCode() must return the same value for
these objects. This means that subclasses of Object usually
override either both methods or none of them.
equals in class Objectthat - the object to compare this instance with.
true if the specified object is equal to this Object; false otherwise.Object.hashCode()public int hashCode()
Objectequals(Object) returns true must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
hashCode in class ObjectObject.equals(java.lang.Object)
|
Build 1.1_r1 (from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||