Reference:Android.content.Resources.Configuration

From Triled Wiki

Jump to: navigation, search


android.content
public static final class android.content.Resources.Configuration

java.lang.Object
android.content.Resources.Configuration Parcelable

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).

[edit] Summary

[edit] Constants

      Value  
Creator   CREATOR        
int  KEYBOARDHIDDEN_NO     0x00000001 
int  KEYBOARDHIDDEN_UNDEFINED     0x00000000 
int  KEYBOARDHIDDEN_YES     0x00000002 
int  KEYBOARD_12KEY     0x00000003 
int  KEYBOARD_NOKEYS     0x00000001 
int  KEYBOARD_QWERTY     0x00000002 
int  KEYBOARD_UNDEFINED     0x00000000 
int  NAVIGATION_DPAD     0x00000002 
int  NAVIGATION_NONAV     0x00000001 
int  NAVIGATION_TRACKBALL     0x00000003 
int  NAVIGATION_UNDEFINED     0x00000000 
int  NAVIGATION_WHEEL     0x00000004 
int  ORIENTATION_LANDSCAPE     0x00000002 
int  ORIENTATION_PORTRAIT     0x00000001 
int  ORIENTATION_SQUARE     0x00000003 
int  ORIENTATION_UNDEFINED     0x00000000 
int  TOUCHSCREEN_FINGER     0x00000003 
int  TOUCHSCREEN_NOTOUCH     0x00000001 
int  TOUCHSCREEN_STYLUS     0x00000002 
int  TOUCHSCREEN_UNDEFINED     0x00000000 

[edit] Fields

public      float  fontScale   Current user preference for the scaling factor for fonts, relative to the base density scaling.  
public      int  keyboard   The kind of keyboard attached to the device.  
public      int  keyboardHidden   A flag indicating whether the keyboard has been hidden.  
public      Locale   locale   Current user preference for the locale.  
public      int  navigation   The kind of navigation method available on the device.  
public      int  orientation   Overall orientation of the screen.  
public      int  touchscreen   The kind of touch screen attached to the device.  

[edit] Public Constructors

          Resources.Configuration ()
Construct an invalid Configuration. You must call setToDefaults() for this object to be valid.
          Resources.Configuration (Configuration o)
Makes a deep copy suitable for modification.

[edit] Public Methods

        void  setToDefaults ()
Set this object to the system defaults.
        String   toString ()
Answers a string containing a concise, human-readable description of the receiver.
        int  updateFrom (Configuration delta)
Copy the fields from delta into this Configuration object.
        void  writeToParcel (Parcel dest)
Write this Configuration to the given Parcel.

[edit] Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
[edit] Methods inherited from interface android.os.Parcelable

writeToParcel

[edit] Details

[edit] Constants

[edit] public static final Creator CREATOR

[edit] public static final int KEYBOARDHIDDEN_NO

Constant Value: 1 (0x00000001)

[edit] public static final int KEYBOARDHIDDEN_UNDEFINED

Constant Value: 0 (0x00000000)

[edit] public static final int KEYBOARDHIDDEN_YES

Constant Value: 2 (0x00000002)

[edit] public static final int KEYBOARD_12KEY

Constant Value: 3 (0x00000003)

[edit] public static final int KEYBOARD_NOKEYS

Constant Value: 1 (0x00000001)

[edit] public static final int KEYBOARD_QWERTY

Constant Value: 2 (0x00000002)

[edit] public static final int KEYBOARD_UNDEFINED

Constant Value: 0 (0x00000000)

[edit] public static final int NAVIGATION_DPAD

Constant Value: 2 (0x00000002)

[edit] public static final int NAVIGATION_NONAV

Constant Value: 1 (0x00000001)

[edit] public static final int NAVIGATION_TRACKBALL

Constant Value: 3 (0x00000003)

[edit] public static final int NAVIGATION_UNDEFINED

Constant Value: 0 (0x00000000)

[edit] public static final int NAVIGATION_WHEEL

Constant Value: 4 (0x00000004)

[edit] public static final int ORIENTATION_LANDSCAPE

Constant Value: 2 (0x00000002)

[edit] public static final int ORIENTATION_PORTRAIT

Constant Value: 1 (0x00000001)

[edit] public static final int ORIENTATION_SQUARE

Constant Value: 3 (0x00000003)

[edit] public static final int ORIENTATION_UNDEFINED

Constant Value: 0 (0x00000000)

[edit] public static final int TOUCHSCREEN_FINGER

Constant Value: 3 (0x00000003)

[edit] public static final int TOUCHSCREEN_NOTOUCH

Constant Value: 1 (0x00000001)

[edit] public static final int TOUCHSCREEN_STYLUS

Constant Value: 2 (0x00000002)

[edit] public static final int TOUCHSCREEN_UNDEFINED

Constant Value: 0 (0x00000000)

[edit] Fields

[edit] public float fontScale

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

[edit] public int keyboard

The kind of keyboard attached to the device. One of: KEYBOARD_QWERTY, KEYBOARD_12KEY.

[edit] public int keyboardHidden

A flag indicating whether the keyboard has been hidden. This will be set on a device with a mechanism to hide the keyboard from the user, when that mechanism is closed.

[edit] public Locale locale

Current user preference for the locale.

[edit] public int navigation

The kind of navigation method available on the device. One of: NAVIGATION_DPAD, NAVIGATION_TRACKBALL, NAVIGATION_WHEEL.

[edit] public int orientation

Overall orientation of the screen. May be one of ORIENTATION_LANDSCAPE, ORIENTATION_PORTRAIT, or ORIENTATION_SQUARE.

[edit] public int touchscreen

The kind of touch screen attached to the device. One of: TOUCHSCREEN_NOTOUCH, TOUCHSCREEN_STYLUS, TOUCHSCREEN_FINGER.

[edit] Public Constructors

[edit] public Resources.Configuration()

Construct an invalid Configuration. You must call setToDefaults() for this object to be valid.


[edit] public Resources.Configuration(Configuration o)

Makes a deep copy suitable for modification.

[edit] Public Methods

[edit] public void setToDefaults()

Set this object to the system defaults.

[edit] public String toString()

Answers a string containing a concise, human-readable description of the receiver.

[edit] public int updateFrom(Configuration delta)

Copy the fields from delta into this Configuration object.

Returns

[edit] public void writeToParcel(Parcel dest)

Write this Configuration to the given Parcel.

[edit] References

Personal tools