Package com.transifex.txnative.wrappers
Class ResourcesWrapper
java.lang.Object
android.content.res.Resources
com.transifex.txnative.wrappers.ResourcesWrapper
This extends Resources but delegates the calls to another Resources object. This enables
any customization done by some subclass of Resources to be also picked up.
-
Nested Class Summary
Nested classes/interfaces inherited from class android.content.res.Resources
Resources.NotFoundException, Resources.Theme -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAnimation(int id) booleangetBoolean(int id) intgetColor(int id) getColorStateList(int id) floatgetDimension(int id) intgetDimensionPixelOffset(int id) intgetDimensionPixelSize(int id) getDrawable(int id) getDrawable(int id, Resources.Theme theme) getDrawableForDensity(int id, int density) getDrawableForDensity(int id, int density, Resources.Theme theme) floatgetFraction(int id, int base, int pbase) intgetIdentifier(String name, String defType, String defPackage) int[]getIntArray(int id) intgetInteger(int id) getLayout(int id) getMovie(int id) getQuantityString(int id, int quantity) getQuantityString(int id, int quantity, Object... formatArgs) getQuantityText(int id, int quantity) getResourceEntryName(int resid) getResourceName(int resid) getResourcePackageName(int resid) getResourceTypeName(int resid) getString(int id) String[]getStringArray(int id) getText(int id) getText(int id, CharSequence def) getTextArray(int id) voidgetValue(int id, TypedValue outValue, boolean resolveRefs) voidgetValue(String name, TypedValue outValue, boolean resolveRefs) voidgetValueForDensity(int id, int density, TypedValue outValue, boolean resolveRefs) getXml(int id) obtainAttributes(AttributeSet set, int[] attrs) obtainTypedArray(int id) openRawResource(int id) openRawResource(int id, TypedValue value) openRawResourceFd(int id) voidparseBundleExtra(String tagName, AttributeSet attrs, Bundle outBundle) voidparseBundleExtras(XmlResourceParser parser, Bundle outBundle) voidupdateConfiguration(Configuration config, DisplayMetrics metrics) Methods inherited from class android.content.res.Resources
addLoaders, finishPreloading, flushLayoutCache, getAssets, getAttributeSetSourceResId, getColor, getColorStateList, getFloat, getFont, getSystem, newTheme, removeLoaders
-
Constructor Details
-
ResourcesWrapper
-
-
Method Details
-
getText
- Overrides:
getTextin classResources- Throws:
Resources.NotFoundException
-
getQuantityText
- Overrides:
getQuantityTextin classResources- Throws:
Resources.NotFoundException
-
getString
- Overrides:
getStringin classResources- Throws:
Resources.NotFoundException
-
getString
- Overrides:
getStringin classResources- Throws:
Resources.NotFoundException
-
getQuantityString
public String getQuantityString(int id, int quantity, Object... formatArgs) throws Resources.NotFoundException - Overrides:
getQuantityStringin classResources- Throws:
Resources.NotFoundException
-
getQuantityString
- Overrides:
getQuantityStringin classResources- Throws:
Resources.NotFoundException
-
getText
-
getTextArray
- Overrides:
getTextArrayin classResources- Throws:
Resources.NotFoundException
-
getStringArray
- Overrides:
getStringArrayin classResources- Throws:
Resources.NotFoundException
-
getIntArray
- Overrides:
getIntArrayin classResources- Throws:
Resources.NotFoundException
-
obtainTypedArray
- Overrides:
obtainTypedArrayin classResources- Throws:
Resources.NotFoundException
-
getDimension
- Overrides:
getDimensionin classResources- Throws:
Resources.NotFoundException
-
getDimensionPixelOffset
- Overrides:
getDimensionPixelOffsetin classResources- Throws:
Resources.NotFoundException
-
getDimensionPixelSize
- Overrides:
getDimensionPixelSizein classResources- Throws:
Resources.NotFoundException
-
getFraction
public float getFraction(int id, int base, int pbase) - Overrides:
getFractionin classResources
-
getDrawable
- Overrides:
getDrawablein classResources- Throws:
Resources.NotFoundException
-
getDrawable
@RequiresApi(21) public Drawable getDrawable(int id, Resources.Theme theme) throws Resources.NotFoundException - Overrides:
getDrawablein classResources- Throws:
Resources.NotFoundException
-
getDrawableForDensity
@RequiresApi(15) public Drawable getDrawableForDensity(int id, int density) throws Resources.NotFoundException - Overrides:
getDrawableForDensityin classResources- Throws:
Resources.NotFoundException
-
getDrawableForDensity
- Overrides:
getDrawableForDensityin classResources
-
getMovie
- Overrides:
getMoviein classResources- Throws:
Resources.NotFoundException
-
getColor
- Overrides:
getColorin classResources- Throws:
Resources.NotFoundException
-
getColorStateList
- Overrides:
getColorStateListin classResources- Throws:
Resources.NotFoundException
-
getBoolean
- Overrides:
getBooleanin classResources- Throws:
Resources.NotFoundException
-
getInteger
- Overrides:
getIntegerin classResources- Throws:
Resources.NotFoundException
-
getLayout
- Overrides:
getLayoutin classResources- Throws:
Resources.NotFoundException
-
getAnimation
- Overrides:
getAnimationin classResources- Throws:
Resources.NotFoundException
-
getXml
- Overrides:
getXmlin classResources- Throws:
Resources.NotFoundException
-
openRawResource
- Overrides:
openRawResourcein classResources- Throws:
Resources.NotFoundException
-
openRawResource
- Overrides:
openRawResourcein classResources- Throws:
Resources.NotFoundException
-
openRawResourceFd
- Overrides:
openRawResourceFdin classResources- Throws:
Resources.NotFoundException
-
getValue
public void getValue(int id, TypedValue outValue, boolean resolveRefs) throws Resources.NotFoundException - Overrides:
getValuein classResources- Throws:
Resources.NotFoundException
-
getValueForDensity
@RequiresApi(15) public void getValueForDensity(int id, int density, TypedValue outValue, boolean resolveRefs) throws Resources.NotFoundException - Overrides:
getValueForDensityin classResources- Throws:
Resources.NotFoundException
-
getValue
public void getValue(String name, TypedValue outValue, boolean resolveRefs) throws Resources.NotFoundException - Overrides:
getValuein classResources- Throws:
Resources.NotFoundException
-
obtainAttributes
- Overrides:
obtainAttributesin classResources
-
updateConfiguration
- Overrides:
updateConfigurationin classResources
-
getDisplayMetrics
- Overrides:
getDisplayMetricsin classResources
-
getConfiguration
- Overrides:
getConfigurationin classResources
-
getIdentifier
- Overrides:
getIdentifierin classResources
-
getResourceName
- Overrides:
getResourceNamein classResources- Throws:
Resources.NotFoundException
-
getResourcePackageName
- Overrides:
getResourcePackageNamein classResources- Throws:
Resources.NotFoundException
-
getResourceTypeName
- Overrides:
getResourceTypeNamein classResources- Throws:
Resources.NotFoundException
-
getResourceEntryName
- Overrides:
getResourceEntryNamein classResources- Throws:
Resources.NotFoundException
-
parseBundleExtras
public void parseBundleExtras(XmlResourceParser parser, Bundle outBundle) throws XmlPullParserException, IOException - Overrides:
parseBundleExtrasin classResources- Throws:
XmlPullParserExceptionIOException
-
parseBundleExtra
public void parseBundleExtra(String tagName, AttributeSet attrs, Bundle outBundle) throws XmlPullParserException - Overrides:
parseBundleExtrain classResources- Throws:
XmlPullParserException
-