public class ResTable_config extends Object
Modifier and Type | Class | Description |
---|---|---|
static class |
ResTable_config.Type |
The different types of configs that can be present in a
ResTable_config . |
Modifier and Type | Field | Description |
---|---|---|
byte |
colorMode |
|
byte[] |
country |
Returns a packed 2-byte country code.
|
int |
density |
|
static int |
DENSITY_ANY |
|
static int |
DENSITY_DEFAULT |
|
static int |
DENSITY_DPI_ANY |
|
static int |
DENSITY_DPI_MDPI |
|
static int |
DENSITY_DPI_NONE |
|
static int |
DENSITY_DPI_UNDEFINED |
|
static int |
DENSITY_HIGH |
|
static int |
DENSITY_LOW |
|
static int |
DENSITY_MEDIUM |
|
static int |
DENSITY_NONE |
|
static int |
DENSITY_TV |
|
static int |
DENSITY_XHIGH |
|
static int |
DENSITY_XXHIGH |
|
static int |
DENSITY_XXXHIGH |
|
static int |
HDR_ANY |
|
static int |
HDR_NO |
|
static int |
HDR_YES |
|
int |
inputFlags |
|
int |
keyboard |
|
static int |
KEYBOARD_ANY |
|
static byte |
KEYSHIDDEN_ANY |
|
static byte |
KEYSHIDDEN_NO |
|
static byte |
KEYSHIDDEN_SOFT |
|
static byte |
KEYSHIDDEN_YES |
|
byte[] |
language |
Returns a packed 2-byte language code.
|
static int |
LAYOUTDIR_ANY |
|
static int |
LAYOUTDIR_LTR |
|
static int |
LAYOUTDIR_RTL |
|
byte[] |
localeScript |
The ISO-15924 short name for the script corresponding to this configuration.
|
byte[] |
localeVariant |
A single BCP-47 variant subtag.
|
static int |
MASK_HDR |
|
static int |
MASK_KEYSHIDDEN |
|
static int |
MASK_LAYOUTDIR |
|
static int |
MASK_NAVHIDDEN |
|
static int |
MASK_SCREENLONG |
|
static int |
MASK_UI_MODE_NIGHT |
|
static int |
MASK_UI_MODE_TYPE |
|
static int |
MASK_WIDE_COLOR_GAMUT |
|
int |
mcc |
|
int |
minorVersion |
|
static int |
MINORVERSION_ANY |
|
int |
mnc |
|
static byte |
NAVHIDDEN_ANY |
|
static byte |
NAVHIDDEN_NO |
|
static byte |
NAVHIDDEN_YES |
|
int |
navigation |
|
static int |
NAVIGATION_ANY |
|
int |
orientation |
|
static int |
ORIENTATION_ANY |
|
static int |
ORIENTATION_LAND |
|
static int |
ORIENTATION_PORT |
|
static int |
ORIENTATION_SQUARE |
|
static int |
RESTABLE_MAX_LOCALE_LEN |
|
short |
screenConfigPad2 |
|
int |
screenHeight |
|
static int |
SCREENHEIGHT_ANY |
|
int |
screenHeightDp |
|
int |
screenLayout |
|
byte |
screenLayout2 |
An extension to
screenLayout . |
static int |
SCREENLONG_ANY |
|
static int |
SCREENLONG_NO |
|
static int |
SCREENLONG_YES |
|
static int |
SCREENROUND_ANY |
|
static int |
SCREENROUND_NO |
|
static int |
SCREENROUND_YES |
|
static int |
SCREENSIZE_ANY |
|
static int |
SCREENSIZE_LARGE |
|
static int |
SCREENSIZE_NORMAL |
|
static int |
SCREENSIZE_SMALL |
|
static int |
SCREENSIZE_XLARGE |
|
int |
screenWidth |
|
static int |
SCREENWIDTH_ANY |
|
int |
screenWidthDp |
|
int |
sdkVersion |
|
static int |
SDKVERSION_ANY |
|
static int |
SHIFT_LAYOUTDIR |
|
static int |
SHIFT_NAVHIDDEN |
|
static int |
SHIFT_SCREENLONG |
|
static int |
SHIFT_UI_MODE_NIGHT |
|
static int |
SIZEOF |
|
int |
smallestScreenWidthDp |
|
int |
touchscreen |
|
static int |
TOUCHSCREEN_ANY |
|
static int |
TOUCHSCREEN_FINGER |
|
static int |
UI_MODE_NIGHT_ANY |
|
static int |
UI_MODE_NIGHT_NO |
|
static int |
UI_MODE_TYPE_ANY |
|
static int |
UI_MODE_TYPE_NORMAL |
|
int |
uiMode |
|
byte[] |
unknown |
Any remaining bytes in this resource configuration that are unaccounted for.
|
static int |
WIDE_COLOR_GAMUT_ANY |
|
static int |
WIDE_COLOR_GAMUT_NO |
|
static int |
WIDE_COLOR_GAMUT_YES |
Constructor | Description |
---|---|
ResTable_config() |
|
ResTable_config(int size,
int mcc,
int mnc,
byte[] language,
byte[] country,
int orientation,
int touchscreen,
int density,
int keyboard,
int navigation,
int inputFlags,
int screenWidth,
int screenHeight,
int sdkVersion,
int minorVersion,
int screenLayout,
int uiMode,
int smallestScreenWidthDp,
int screenWidthDp,
int screenHeightDp,
byte[] localeScript,
byte[] localeVariant,
byte screenLayout2,
byte colorMode,
short screenConfigPad2,
byte[] unknown) |
|
ResTable_config(ResTable_config other) |
Modifier and Type | Method | Description |
---|---|---|
int |
colorModeHdr() |
Returns the HDR section of
colorMode . |
int |
colorModeWideColorGamut() |
Returns the wide color gamut section of
colorMode . |
boolean |
isBetterThan(ResTable_config o,
ResTable_config requested) |
|
boolean |
isDefault() |
Returns true if this is the default "any" configuration.
|
int |
keyboardHidden() |
|
void |
keyboardHidden(int value) |
|
String |
languageString() |
Returns
language as an unpacked string representation. |
String |
localeScriptString() |
Returns the
localeScript as a string. |
String |
localeVariantString() |
Returns the
localeVariant as a string. |
boolean |
match(ResTable_config settings) |
|
int |
navigationHidden() |
|
void |
navigationHidden(int value) |
|
void |
packLanguage(String language) |
|
void |
packRegion(String region) |
|
String |
regionString() |
Returns
country as an unpacked string representation. |
int |
screenLayoutDirection() |
|
void |
screenLayoutDirection(int value) |
|
int |
screenLayoutLong() |
|
void |
screenLayoutLong(int value) |
|
int |
screenLayoutRound() |
|
void |
screenLayoutRound(int value) |
|
int |
screenLayoutSize() |
|
void |
screenLayoutSize(int value) |
|
String |
scriptString() |
|
void |
setBcp47Locale(String in) |
|
String |
toString() |
|
Map<ResTable_config.Type,String> |
toStringParts() |
Returns a map of the configuration parts for
toString() . |
int |
uiModeNight() |
|
void |
uiModeNight(int value) |
|
int |
uiModeType() |
|
void |
uiModeType(int value) |
|
ResTable_config |
withSdkVersion(int sdkVersion) |
Returns a copy of this resource configuration with a different
sdkVersion , or this
configuration if the sdkVersion is the same. |
public static final int RESTABLE_MAX_LOCALE_LEN
public static final int SIZEOF
public static final int SHIFT_LAYOUTDIR
public static final int LAYOUTDIR_ANY
public static final int LAYOUTDIR_LTR
public static final int LAYOUTDIR_RTL
public static final int SCREENWIDTH_ANY
public static final int SCREENSIZE_ANY
public static final int SCREENSIZE_SMALL
public static final int SCREENSIZE_NORMAL
public static final int SCREENSIZE_LARGE
public static final int SCREENSIZE_XLARGE
public static final int MASK_UI_MODE_TYPE
public static final int UI_MODE_TYPE_ANY
public static final int UI_MODE_TYPE_NORMAL
public static final int MASK_UI_MODE_NIGHT
public static final int SHIFT_UI_MODE_NIGHT
public static final int UI_MODE_NIGHT_ANY
public static final int DENSITY_DEFAULT
public static final int DENSITY_LOW
public static final int DENSITY_MEDIUM
public static final int DENSITY_TV
public static final int DENSITY_HIGH
public static final int DENSITY_XHIGH
public static final int DENSITY_XXHIGH
public static final int DENSITY_XXXHIGH
public static final int DENSITY_ANY
public static final int DENSITY_NONE
public static final int TOUCHSCREEN_ANY
public static final int MASK_KEYSHIDDEN
public static final byte KEYSHIDDEN_ANY
public static final byte KEYSHIDDEN_NO
public static final byte KEYSHIDDEN_YES
public static final byte KEYSHIDDEN_SOFT
public static final int KEYBOARD_ANY
public static final int MASK_NAVHIDDEN
public static final int SHIFT_NAVHIDDEN
public static final byte NAVHIDDEN_ANY
public static final byte NAVHIDDEN_NO
public static final byte NAVHIDDEN_YES
public static final int NAVIGATION_ANY
public static final int SCREENHEIGHT_ANY
public static final int SDKVERSION_ANY
public static final int MINORVERSION_ANY
public static final int WIDE_COLOR_GAMUT_ANY
public static final int WIDE_COLOR_GAMUT_NO
public static final int WIDE_COLOR_GAMUT_YES
public static final int MASK_WIDE_COLOR_GAMUT
public static final int HDR_ANY
public static final int HDR_NO
public static final int HDR_YES
public static final int MASK_HDR
public static final int DENSITY_DPI_UNDEFINED
public static final int DENSITY_DPI_MDPI
public static final int DENSITY_DPI_ANY
public static final int DENSITY_DPI_NONE
public static final int ORIENTATION_ANY
public static final int ORIENTATION_PORT
public static final int ORIENTATION_LAND
public static final int ORIENTATION_SQUARE
public static final int MASK_SCREENLONG
public static final int SHIFT_SCREENLONG
public static final int SCREENLONG_ANY
public static final int SCREENLONG_NO
public static final int SCREENLONG_YES
public static final int SCREENROUND_ANY
public static final int SCREENROUND_NO
public static final int SCREENROUND_YES
public static final int TOUCHSCREEN_FINGER
public static final int UI_MODE_NIGHT_NO
public int mcc
public int mnc
public final byte[] language
public final byte[] country
public int orientation
public int touchscreen
public int density
public int keyboard
public int navigation
public int inputFlags
public int screenWidth
public int screenHeight
public int sdkVersion
public int minorVersion
public int screenLayout
public int uiMode
public int smallestScreenWidthDp
public int screenWidthDp
public int screenHeightDp
public final byte[] localeScript
public final byte[] localeVariant
public byte screenLayout2
screenLayout
. Contains round/notround qualifier.public byte colorMode
public short screenConfigPad2
public byte[] unknown
public static final int MASK_LAYOUTDIR
public ResTable_config(ResTable_config other)
public ResTable_config(int size, int mcc, int mnc, byte[] language, byte[] country, int orientation, int touchscreen, int density, int keyboard, int navigation, int inputFlags, int screenWidth, int screenHeight, int sdkVersion, int minorVersion, int screenLayout, int uiMode, int smallestScreenWidthDp, int screenWidthDp, int screenHeightDp, byte[] localeScript, byte[] localeVariant, byte screenLayout2, byte colorMode, short screenConfigPad2, byte[] unknown)
public ResTable_config()
@Nonnull public final String languageString()
language
as an unpacked string representation.public final String localeScriptString()
localeScript
as a string.public final String localeVariantString()
localeVariant
as a string.public final int colorModeWideColorGamut()
colorMode
.public final int colorModeHdr()
colorMode
.@Nonnull public final String regionString()
country
as an unpacked string representation.public final String scriptString()
public final int keyboardHidden()
public final void keyboardHidden(int value)
public final int navigationHidden()
public final void navigationHidden(int value)
public final ResTable_config withSdkVersion(int sdkVersion)
sdkVersion
, or this
configuration if the sdkVersion
is the same.sdkVersion
- The SDK version of the returned configuration.public final int screenLayoutDirection()
public final void screenLayoutDirection(int value)
public final int screenLayoutSize()
public final void screenLayoutSize(int value)
public final int screenLayoutLong()
public final void screenLayoutLong(int value)
public final int screenLayoutRound()
public final void screenLayoutRound(int value)
public final int uiModeType()
public final void uiModeType(int value)
public final int uiModeNight()
public final void uiModeNight(int value)
public void packLanguage(String language)
public void packRegion(String region)
public final boolean isDefault()
public final Map<ResTable_config.Type,String> toStringParts()
toString()
.
If a configuration part is not defined for this ResTable_config
, its value
will be the empty string.public boolean isBetterThan(ResTable_config o, ResTable_config requested)
public boolean match(ResTable_config settings)
public void setBcp47Locale(String in)