public class ConfigurationInfo
extends Object implements Parcelable
| java.lang.Object | |
| android.content.pm.ConfigurationInfo | |
您可以检索有关应用程序声明的硬件配置首选项的信息。 这对应于从AndroidManifest.xml的<uses-configuration>和<uses-feature>标记中收集的信息。
常量(Constants) |
|
|---|---|
int |
GL_ES_VERSION_UNDEFINED
|
int |
INPUT_FEATURE_FIVE_WAY_NAV
|
int |
INPUT_FEATURE_HARD_KEYBOARD
|
Inherited constants |
|---|
android.os.Parcelable
|
Fields |
|
|---|---|
public static final Creator<ConfigurationInfo> |
CREATOR |
public int |
reqGlEsVersion 应用程序使用的GLES版本。 |
public int |
reqInputFeatures 与输入要素关联的标志。 |
public int |
reqKeyboardType 应用程序的输入法偏好。 |
public int |
reqNavigation 一个标志,指示是否有任何键盘可用。 |
public int |
reqTouchScreen 这种触摸屏连接到设备。 |
Public constructors |
|
|---|---|
ConfigurationInfo() |
|
ConfigurationInfo(ConfigurationInfo orig) |
|
公共方法(Public methods) |
|
|---|---|
int |
describeContents() 描述此Parcelable实例的封送表示中包含的特殊对象的种类。 |
String |
getGlEsVersion() 此方法提取reqGLEsVersion属性的主版本和次版本并将其作为字符串返回。 |
String |
toString() 返回对象的字符串表示形式。 |
void |
writeToParcel(Parcel dest, int parcelableFlags) 将此对象平铺到一个包裹中。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
android.os.Parcelable
|
|
int GL_ES_VERSION_UNDEFINED
reqGlEsVersion默认值;
常量值:0(0x00000000)
int INPUT_FEATURE_FIVE_WAY_NAV
reqInputFeatures值:如果设置,表示应用程序需要五向导航设备
常量值:2(0x00000002)
int INPUT_FEATURE_HARD_KEYBOARD
reqInputFeatures值:如果设置,表示应用程序需要硬键盘
常数值:1(0x00000001)
int reqInputFeatures
与输入要素关联的标志。 的任意组合INPUT_FEATURE_HARD_KEYBOARD , INPUT_FEATURE_FIVE_WAY_NAV
int reqKeyboardType
应用程序的输入法偏好。 一: KEYBOARD_UNDEFINED , KEYBOARD_NOKEYS , KEYBOARD_QWERTY , KEYBOARD_12KEY
int reqNavigation
一个标志,指示是否有任何键盘可用。 之一: NAVIGATION_UNDEFINED , NAVIGATION_DPAD , NAVIGATION_TRACKBALL , NAVIGATION_WHEEL
int reqTouchScreen
这种触摸屏连接到设备。 一: TOUCHSCREEN_NOTOUCH , TOUCHSCREEN_STYLUS , TOUCHSCREEN_FINGER 。
ConfigurationInfo (ConfigurationInfo orig)
| 参数(Parameters) | |
|---|---|
orig |
ConfigurationInfo
|
int describeContents ()
描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象将在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。
| 返回(Returns) | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
String getGlEsVersion ()
此方法提取reqGLEsVersion属性的主版本和次版本并将其作为字符串返回。 说reqGlEsVersion值0x00010002返回为1.2
| 返回(Returns) | |
|---|---|
String |
String representation of the reqGlEsVersion attribute |
String toString ()
返回对象的字符串表示形式。 一般来说, toString方法返回一个“文本表示”该对象的字符串。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。
类Object的toString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:
getClass().getName() + '@' + Integer.toHexString(hashCode())
| 返回(Returns) | |
|---|---|
String |
a string representation of the object. |
void writeToParcel (Parcel dest, int parcelableFlags)
将此对象平铺到一个包裹中。
| 参数(Parameters) | |
|---|---|
dest |
Parcel: The Parcel in which the object should be written. |
parcelableFlags |
int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. |