public class Resources extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Resources.NotFoundException |
class |
Resources.Theme |
| Constructor and Description |
|---|
Resources(AssetManager assets,
DisplayMetrics metrics,
Configuration config) |
public Resources(AssetManager assets, DisplayMetrics metrics, Configuration config)
public static Resources getSystem()
public CharSequence getText(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic CharSequence getQuantityText(int id, int quantity) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic String getString(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic String getString(int id, Object... formatArgs) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic String getQuantityString(int id, int quantity, Object... formatArgs) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic String getQuantityString(int id, int quantity) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic CharSequence getText(int id, CharSequence def)
public CharSequence[] getTextArray(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic String[] getStringArray(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic int[] getIntArray(int id)
throws Resources.NotFoundException
Resources.NotFoundExceptionpublic TypedArray obtainTypedArray(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic float getDimension(int id)
throws Resources.NotFoundException
Resources.NotFoundExceptionpublic int getDimensionPixelOffset(int id)
throws Resources.NotFoundException
Resources.NotFoundExceptionpublic int getDimensionPixelSize(int id)
throws Resources.NotFoundException
Resources.NotFoundExceptionpublic float getFraction(int id,
int base,
int pbase)
public Drawable getDrawable(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic Drawable getDrawableForDensity(int id, int density) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic Movie getMovie(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic int getColor(int id)
throws Resources.NotFoundException
Resources.NotFoundExceptionpublic ColorStateList getColorStateList(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic boolean getBoolean(int id)
throws Resources.NotFoundException
Resources.NotFoundExceptionpublic int getInteger(int id)
throws Resources.NotFoundException
Resources.NotFoundExceptionpublic XmlResourceParser getLayout(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic XmlResourceParser getAnimation(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic XmlResourceParser getXml(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic InputStream openRawResource(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic InputStream openRawResource(int id, TypedValue value) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic AssetFileDescriptor openRawResourceFd(int id) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic void getValue(int id,
TypedValue outValue,
boolean resolveRefs)
throws Resources.NotFoundException
Resources.NotFoundExceptionpublic void getValueForDensity(int id,
int density,
TypedValue outValue,
boolean resolveRefs)
throws Resources.NotFoundException
Resources.NotFoundExceptionpublic void getValue(String name, TypedValue outValue, boolean resolveRefs) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic final Resources.Theme newTheme()
public TypedArray obtainAttributes(AttributeSet set, int[] attrs)
public void updateConfiguration(Configuration config, DisplayMetrics metrics)
public DisplayMetrics getDisplayMetrics()
public Configuration getConfiguration()
public String getResourceName(int resid) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic String getResourcePackageName(int resid) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic String getResourceTypeName(int resid) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic String getResourceEntryName(int resid) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic void parseBundleExtras(XmlResourceParser parser, Bundle outBundle) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserExceptionIOExceptionpublic void parseBundleExtra(String tagName, AttributeSet attrs, Bundle outBundle) throws org.xmlpull.v1.XmlPullParserException
org.xmlpull.v1.XmlPullParserExceptionpublic final AssetManager getAssets()
public final void flushLayoutCache()
public final void finishPreloading()
Copyright © 2008-2013. All Rights Reserved.