java.lang.Object | |
↳ | android.content.res.XResources.DrawableLoader |
Callback for drawable replacements. Instances of this class can passed to
XResources.setReplacement(String, String, String, Object)
and its variants.
Make sure to always return new Drawable
instances, as drawables
usually can't be reused.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when the hooked drawable resource has been requested.
| |||||||||||
Like
newDrawable(XResources, int) , but called for Resources.getDrawableForDensity(int, int) .
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Constructor.
Called when the hooked drawable resource has been requested.
res | The XResources object in which the hooked drawable resides. |
---|---|
id | The resource ID which has been requested. |
Drawable
which should be used as replacement. null
is ignored.Throwable | Everything the callback throws is caught and logged. |
---|
Like newDrawable(XResources, int)
, but called for Resources.getDrawableForDensity(int, int)
. The default
implementation is to use the result of newDrawable(XResources, int)
.
res | The XResources object in which the hooked drawable resides. |
---|---|
id | The resource ID which has been requested. |
density | The desired screen density indicated by the resource as found in
DisplayMetrics . |
Drawable
which should be used as replacement. null
is ignored.Throwable | Everything the callback throws is caught and logged. |
---|