final
void
|
finishPreloading()
Called by zygote when it is done preloading resources, to change back
to normal Resources operation.
|
final
void
|
flushLayoutCache()
Call this to remove all cached loaded layout resources from the
Resources object.
|
XmlResourceParser
|
getAnimation(int id)
Return an XmlResourceParser through which you can read an animation
description for the given resource ID.
|
final
AssetManager
|
getAssets()
Retrieve underlying AssetManager storage for these resources.
|
boolean
|
getBoolean(int id)
Return a boolean associated with a particular resource ID.
|
int
|
getColor(int id, Resources.Theme theme)
Returns a themed color integer associated with a particular resource ID.
|
int
|
getColor(int id)
|
ColorStateList
|
getColorStateList(int id)
|
ColorStateList
|
getColorStateList(int id, Resources.Theme theme)
Returns a themed color state list associated with a particular resource
ID.
|
Configuration
|
getConfiguration()
Return the current configuration that is in effect for this resource
object.
|
float
|
getDimension(int id)
Retrieve a dimensional for a particular resource ID.
|
int
|
getDimensionPixelOffset(int id)
Retrieve a dimensional for a particular resource ID for use
as an offset in raw pixels.
|
int
|
getDimensionPixelSize(int id)
Retrieve a dimensional for a particular resource ID for use
as a size in raw pixels.
|
DisplayMetrics
|
getDisplayMetrics()
Return the current display metrics that are in effect for this resource
object.
|
Drawable
|
getDrawable(int id)
|
Drawable
|
getDrawable(int id, Resources.Theme theme)
Return a drawable object associated with a particular resource ID and
styled for the specified theme.
|
Drawable
|
getDrawableForDensity(int id, int density)
|
Drawable
|
getDrawableForDensity(int id, int density, Resources.Theme theme)
Return a drawable object associated with a particular resource ID for the
given screen density in DPI and styled for the specified theme.
|
float
|
getFraction(int id, int base, int pbase)
Retrieve a fractional unit for a particular resource ID.
|
int
|
getIdentifier(String name, String defType, String defPackage)
Return a resource identifier for the given resource name.
|
int[]
|
getIntArray(int id)
Return the int array associated with a particular resource ID.
|
int
|
getInteger(int id)
Return an integer associated with a particular resource ID.
|
XmlResourceParser
|
getLayout(int id)
Return an XmlResourceParser through which you can read a view layout
description for the given resource ID.
|
Movie
|
getMovie(int id)
Return a movie object associated with the particular resource ID.
|
String
|
getQuantityString(int id, int quantity, Object... formatArgs)
Formats the string necessary for grammatically correct pluralization
of the given resource ID for the given quantity, using the given arguments.
|
String
|
getQuantityString(int id, int quantity)
Returns the string necessary for grammatically correct pluralization
of the given resource ID for the given quantity.
|
CharSequence
|
getQuantityText(int id, int quantity)
Returns the character sequence necessary for grammatically correct pluralization
of the given resource ID for the given quantity.
|
String
|
getResourceEntryName(int resid)
Return the entry name for a given resource identifier.
|
String
|
getResourceName(int resid)
Return the full name for a given resource identifier.
|
String
|
getResourcePackageName(int resid)
Return the package name for a given resource identifier.
|
String
|
getResourceTypeName(int resid)
Return the type name for a given resource identifier.
|
String
|
getString(int id)
Return the string value associated with a particular resource ID. It
will be stripped of any styled text information.
|
String
|
getString(int id, Object... formatArgs)
Return the string value associated with a particular resource ID,
substituting the format arguments as defined in Formatter
and String.format(String, Object...) . It will be stripped of any styled text
information.
|
String[]
|
getStringArray(int id)
Return the string array associated with a particular resource ID.
|
static
Resources
|
getSystem()
Return a global shared Resources object that provides access to only
system resources (no application resources), and is not configured for
the current screen (can not use dimension units, does not change based
on orientation, etc).
|
CharSequence
|
getText(int id, CharSequence def)
Return the string value associated with a particular resource ID.
|
CharSequence
|
getText(int id)
Return the string value associated with a particular resource ID. The
returned object will be a String if this is a plain string; it will be
some other type of CharSequence if it is styled.
|
CharSequence[]
|
getTextArray(int id)
Return the styled text array associated with a particular resource ID.
|
void
|
getValue(String name, TypedValue outValue, boolean resolveRefs)
Return the raw data associated with a particular resource ID.
|
void
|
getValue(int id, TypedValue outValue, boolean resolveRefs)
Return the raw data associated with a particular resource ID.
|
void
|
getValueForDensity(int id, int density, TypedValue outValue, boolean resolveRefs)
Get the raw value associated with a resource with associated density.
|
XmlResourceParser
|
getXml(int id)
Return an XmlResourceParser through which you can read a generic XML
resource for the given resource ID.
|
final
Resources.Theme
|
newTheme()
Generate a new Theme object for this set of Resources.
|
TypedArray
|
obtainAttributes(AttributeSet set, int[] attrs)
Retrieve a set of basic attribute values from an AttributeSet, not
performing styling of them using a theme and/or style resources.
|
TypedArray
|
obtainTypedArray(int id)
Return an array of heterogeneous values.
|
InputStream
|
openRawResource(int id)
Open a data stream for reading a raw resource.
|
InputStream
|
openRawResource(int id, TypedValue value)
Open a data stream for reading a raw resource.
|
AssetFileDescriptor
|
openRawResourceFd(int id)
Open a file descriptor for reading a raw resource.
|
void
|
parseBundleExtra(String tagName, AttributeSet attrs, Bundle outBundle)
Parse a name/value pair out of an XML tag holding that data.
|
void
|
parseBundleExtras(XmlResourceParser parser, Bundle outBundle)
|
void
|
updateConfiguration(Configuration config, DisplayMetrics metrics)
Store the newly updated configuration.
|