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
-
Method Summary
Modifier and TypeMethodDescriptiongetAnimation
(int id) boolean
getBoolean
(int id) int
getColor
(int id) getColorStateList
(int id) float
getDimension
(int id) int
getDimensionPixelOffset
(int id) int
getDimensionPixelSize
(int id) getDrawable
(int id) getDrawable
(int id, Resources.Theme theme) getDrawableForDensity
(int id, int density) getDrawableForDensity
(int id, int density, Resources.Theme theme) float
getFraction
(int id, int base, int pbase) int
getIdentifier
(String name, String defType, String defPackage) int[]
getIntArray
(int id) int
getInteger
(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) void
getValue
(int id, TypedValue outValue, boolean resolveRefs) void
getValue
(String name, TypedValue outValue, boolean resolveRefs) void
getValueForDensity
(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) void
parseBundleExtra
(String tagName, AttributeSet attrs, Bundle outBundle) void
parseBundleExtras
(XmlResourceParser parser, Bundle outBundle) void
updateConfiguration
(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:
getText
in classResources
- Throws:
Resources.NotFoundException
-
getQuantityText
- Overrides:
getQuantityText
in classResources
- Throws:
Resources.NotFoundException
-
getString
- Overrides:
getString
in classResources
- Throws:
Resources.NotFoundException
-
getString
- Overrides:
getString
in classResources
- Throws:
Resources.NotFoundException
-
getQuantityString
public String getQuantityString(int id, int quantity, Object... formatArgs) throws Resources.NotFoundException - Overrides:
getQuantityString
in classResources
- Throws:
Resources.NotFoundException
-
getQuantityString
- Overrides:
getQuantityString
in classResources
- Throws:
Resources.NotFoundException
-
getText
-
getTextArray
- Overrides:
getTextArray
in classResources
- Throws:
Resources.NotFoundException
-
getStringArray
- Overrides:
getStringArray
in classResources
- Throws:
Resources.NotFoundException
-
getIntArray
- Overrides:
getIntArray
in classResources
- Throws:
Resources.NotFoundException
-
obtainTypedArray
- Overrides:
obtainTypedArray
in classResources
- Throws:
Resources.NotFoundException
-
getDimension
- Overrides:
getDimension
in classResources
- Throws:
Resources.NotFoundException
-
getDimensionPixelOffset
- Overrides:
getDimensionPixelOffset
in classResources
- Throws:
Resources.NotFoundException
-
getDimensionPixelSize
- Overrides:
getDimensionPixelSize
in classResources
- Throws:
Resources.NotFoundException
-
getFraction
public float getFraction(int id, int base, int pbase) - Overrides:
getFraction
in classResources
-
getDrawable
- Overrides:
getDrawable
in classResources
- Throws:
Resources.NotFoundException
-
getDrawable
@RequiresApi(21) public Drawable getDrawable(int id, Resources.Theme theme) throws Resources.NotFoundException - Overrides:
getDrawable
in classResources
- Throws:
Resources.NotFoundException
-
getDrawableForDensity
@RequiresApi(15) public Drawable getDrawableForDensity(int id, int density) throws Resources.NotFoundException - Overrides:
getDrawableForDensity
in classResources
- Throws:
Resources.NotFoundException
-
getDrawableForDensity
- Overrides:
getDrawableForDensity
in classResources
-
getMovie
- Overrides:
getMovie
in classResources
- Throws:
Resources.NotFoundException
-
getColor
- Overrides:
getColor
in classResources
- Throws:
Resources.NotFoundException
-
getColorStateList
- Overrides:
getColorStateList
in classResources
- Throws:
Resources.NotFoundException
-
getBoolean
- Overrides:
getBoolean
in classResources
- Throws:
Resources.NotFoundException
-
getInteger
- Overrides:
getInteger
in classResources
- Throws:
Resources.NotFoundException
-
getLayout
- Overrides:
getLayout
in classResources
- Throws:
Resources.NotFoundException
-
getAnimation
- Overrides:
getAnimation
in classResources
- Throws:
Resources.NotFoundException
-
getXml
- Overrides:
getXml
in classResources
- Throws:
Resources.NotFoundException
-
openRawResource
- Overrides:
openRawResource
in classResources
- Throws:
Resources.NotFoundException
-
openRawResource
- Overrides:
openRawResource
in classResources
- Throws:
Resources.NotFoundException
-
openRawResourceFd
- Overrides:
openRawResourceFd
in classResources
- Throws:
Resources.NotFoundException
-
getValue
public void getValue(int id, TypedValue outValue, boolean resolveRefs) throws Resources.NotFoundException - Overrides:
getValue
in classResources
- Throws:
Resources.NotFoundException
-
getValueForDensity
@RequiresApi(15) public void getValueForDensity(int id, int density, TypedValue outValue, boolean resolveRefs) throws Resources.NotFoundException - Overrides:
getValueForDensity
in classResources
- Throws:
Resources.NotFoundException
-
getValue
public void getValue(String name, TypedValue outValue, boolean resolveRefs) throws Resources.NotFoundException - Overrides:
getValue
in classResources
- Throws:
Resources.NotFoundException
-
obtainAttributes
- Overrides:
obtainAttributes
in classResources
-
updateConfiguration
- Overrides:
updateConfiguration
in classResources
-
getDisplayMetrics
- Overrides:
getDisplayMetrics
in classResources
-
getConfiguration
- Overrides:
getConfiguration
in classResources
-
getIdentifier
- Overrides:
getIdentifier
in classResources
-
getResourceName
- Overrides:
getResourceName
in classResources
- Throws:
Resources.NotFoundException
-
getResourcePackageName
- Overrides:
getResourcePackageName
in classResources
- Throws:
Resources.NotFoundException
-
getResourceTypeName
- Overrides:
getResourceTypeName
in classResources
- Throws:
Resources.NotFoundException
-
getResourceEntryName
- Overrides:
getResourceEntryName
in classResources
- Throws:
Resources.NotFoundException
-
parseBundleExtras
public void parseBundleExtras(XmlResourceParser parser, Bundle outBundle) throws XmlPullParserException, IOException - Overrides:
parseBundleExtras
in classResources
- Throws:
XmlPullParserException
IOException
-
parseBundleExtra
public void parseBundleExtra(String tagName, AttributeSet attrs, Bundle outBundle) throws XmlPullParserException - Overrides:
parseBundleExtra
in classResources
- Throws:
XmlPullParserException
-