void
|
applyTheme(Resources.Theme t)
Applies the specified theme to this Drawable and its children.
|
boolean
|
canApplyTheme()
|
void
|
clearColorFilter()
Removes the color filter for this drawable.
|
final
Rect
|
copyBounds()
Return a copy of the drawable's bounds in a new Rect.
|
final
void
|
copyBounds(Rect bounds)
Return a copy of the drawable's bounds in the specified Rect (allocated
by the caller).
|
static
Drawable
|
createFromPath(String pathName)
Create a drawable from file path name.
|
static
Drawable
|
createFromResourceStream(Resources res, TypedValue value, InputStream is, String srcName, BitmapFactory.Options opts)
Create a drawable from an inputstream, using the given resources and
value to determine density information.
|
static
Drawable
|
createFromResourceStream(Resources res, TypedValue value, InputStream is, String srcName)
Create a drawable from an inputstream, using the given resources and
value to determine density information.
|
static
Drawable
|
createFromStream(InputStream is, String srcName)
Create a drawable from an inputstream
|
static
Drawable
|
createFromXml(Resources r, XmlPullParser parser, Resources.Theme theme)
|
static
Drawable
|
createFromXml(Resources r, XmlPullParser parser)
Create a drawable from an XML document.
|
static
Drawable
|
createFromXmlInner(Resources r, XmlPullParser parser, AttributeSet attrs)
Create from inside an XML document.
|
static
Drawable
|
createFromXmlInner(Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme)
Create a drawable from inside an XML document using an optional
Resources.Theme .
|
abstract
void
|
draw(Canvas canvas)
Draw in its bounds (set via setBounds) respecting optional effects such
as alpha (set via setAlpha) and color filter (set via setColorFilter).
|
int
|
getAlpha()
Gets the current alpha value for the drawable.
|
final
Rect
|
getBounds()
Return the drawable's bounds Rect.
|
Drawable.Callback
|
getCallback()
|
int
|
getChangingConfigurations()
Return a mask of the configuration parameters for which this drawable
may change, requiring that it be re-created.
|
ColorFilter
|
getColorFilter()
Returns the current color filter, or null if none set.
|
Drawable.ConstantState
|
getConstantState()
|
Drawable
|
getCurrent()
|
Rect
|
getDirtyBounds()
Return the drawable's dirty bounds Rect.
|
int
|
getIntrinsicHeight()
Return the intrinsic height of the underlying drawable object.
|
int
|
getIntrinsicWidth()
Return the intrinsic width of the underlying drawable object.
|
final
int
|
getLevel()
Retrieve the current level.
|
int
|
getMinimumHeight()
Returns the minimum height suggested by this Drawable.
|
int
|
getMinimumWidth()
Returns the minimum width suggested by this Drawable.
|
abstract
int
|
getOpacity()
Return the opacity/transparency of this Drawable.
|
void
|
getOutline(Outline outline)
Called to get the drawable to populate the Outline that defines its drawing area.
|
boolean
|
getPadding(Rect padding)
Return in padding the insets suggested by this Drawable for placing
content inside the drawable's bounds.
|
int[]
|
getState()
|
Region
|
getTransparentRegion()
Returns a Region representing the part of the Drawable that is completely
transparent.
|
void
|
inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme)
Inflate this Drawable from an XML resource optionally styled by a theme.
|
void
|
inflate(Resources r, XmlPullParser parser, AttributeSet attrs)
Inflate this Drawable from an XML resource.
|
void
|
invalidateSelf()
|
boolean
|
isAutoMirrored()
Tells if this Drawable will be automatically mirrored when its layout direction is RTL
right-to-left.
|
boolean
|
isStateful()
Indicates whether this drawable will change its appearance based on
state.
|
final
boolean
|
isVisible()
|
void
|
jumpToCurrentState()
If this Drawable does transition animations between states, ask that
it immediately jump to the current state and skip any active animations.
|
Drawable
|
mutate()
Make this drawable mutable.
|
void
|
onBoundsChange(Rect bounds)
Override this in your subclass to change appearance if you vary based on
the bounds.
|
boolean
|
onLevelChange(int level)
Override this in your subclass to change appearance if you vary based
on level.
|
boolean
|
onStateChange(int[] state)
Override this in your subclass to change appearance if you recognize the
specified state.
|
static
int
|
resolveOpacity(int op1, int op2)
Return the appropriate opacity value for two source opacities.
|
void
|
scheduleSelf(Runnable what, long when)
|
abstract
void
|
setAlpha(int alpha)
Specify an alpha value for the drawable.
|
void
|
setAutoMirrored(boolean mirrored)
Set whether this Drawable is automatically mirrored when its layout direction is RTL
(right-to left).
|
void
|
setBounds(Rect bounds)
Specify a bounding rectangle for the Drawable.
|
void
|
setBounds(int left, int top, int right, int bottom)
Specify a bounding rectangle for the Drawable.
|
final
void
|
setCallback(Drawable.Callback cb)
|
void
|
setChangingConfigurations(int configs)
Set a mask of the configuration parameters for which this drawable
may change, requiring that it be re-created.
|
abstract
void
|
setColorFilter(ColorFilter cf)
Specify an optional color filter for the drawable.
|
void
|
setColorFilter(int color, PorterDuff.Mode mode)
Specify a color and Porter-Duff mode to be the color filter for this
drawable.
|
void
|
setDither(boolean dither)
Set to true to have the drawable dither its colors when drawn to a device
with fewer than 8-bits per color component.
|
void
|
setFilterBitmap(boolean filter)
Set to true to have the drawable filter its bitmap when scaled or rotated
(for drawables that use bitmaps).
|
void
|
setHotspot(float x, float y)
Specifies the hotspot's location within the drawable.
|
void
|
setHotspotBounds(int left, int top, int right, int bottom)
Sets the bounds to which the hotspot is constrained, if they should be
different from the drawable bounds.
|
final
boolean
|
setLevel(int level)
Specify the level for the drawable.
|
boolean
|
setState(int[] stateSet)
Specify a set of states for the drawable.
|
void
|
setTint(int tint)
Specifies a tint for this drawable.
|
void
|
setTintList(ColorStateList tint)
Specifies a tint for this drawable as a color state list.
|
void
|
setTintMode(PorterDuff.Mode tintMode)
Specifies a tint blending mode for this drawable.
|
boolean
|
setVisible(boolean visible, boolean restart)
Set whether this Drawable is visible.
|
void
|
unscheduleSelf(Runnable what)
|