public abstract class LollipopDrawable
extends android.graphics.drawable.Drawable
Constructor and Description |
---|
LollipopDrawable() |
Modifier and Type | Method and Description |
---|---|
void |
applyTheme(android.content.res.Resources.Theme t)
Applies the specified theme to this Drawable and its children.
|
boolean |
canApplyTheme() |
int |
getAlpha()
Gets the current alpha value for the drawable. 0 means fully transparent,
255 means fully opaque.
|
android.graphics.ColorFilter |
getColorFilter()
Returns the current color filter, or
null if none set. |
void |
getHotspotBounds(android.graphics.Rect outRect) |
void |
inflate(android.content.res.Resources r,
org.xmlpull.v1.XmlPullParser parser,
android.util.AttributeSet attrs,
android.content.res.Resources.Theme theme)
Inflate this Drawable from an XML resource optionally styled by a theme.
|
void |
setAlpha(int alpha) |
void |
setColorFilter(android.graphics.ColorFilter cf) |
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.
|
void |
setTint(int tint)
Specifies a tint for this drawable.
|
void |
setTintList(android.content.res.ColorStateList tint)
Specifies a tint for this drawable as a color state list.
|
void |
setTintMode(android.graphics.PorterDuff.Mode tintMode)
Specifies a tint blending mode for this drawable.
|
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, draw, getBounds, getCallback, getChangingConfigurations, getConstantState, getCurrent, getDirtyBounds, getIntrinsicHeight, getIntrinsicWidth, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOpacity, getOutline, getPadding, getState, getTransparentRegion, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isStateful, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLayoutDirectionChanged, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setLayoutDirection, setLevel, setState, setVisible, unscheduleSelf
public void inflate(android.content.res.Resources r, org.xmlpull.v1.XmlPullParser parser, android.util.AttributeSet attrs, android.content.res.Resources.Theme theme) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException
inflate
in class android.graphics.drawable.Drawable
r
- Resources used to resolve attribute valuesparser
- XML parser from which to inflate this Drawableattrs
- Base set of attribute valuestheme
- Theme to apply, may be nullorg.xmlpull.v1.XmlPullParserException
java.io.IOException
public void setColorFilter(android.graphics.ColorFilter cf)
setColorFilter
in class android.graphics.drawable.Drawable
public void setAlpha(int alpha)
setAlpha
in class android.graphics.drawable.Drawable
public android.graphics.ColorFilter getColorFilter()
null
if none set.getColorFilter
in class android.graphics.drawable.Drawable
null
if none setpublic int getAlpha()
getAlpha
in class android.graphics.drawable.Drawable
public boolean canApplyTheme()
canApplyTheme
in class android.graphics.drawable.Drawable
public void applyTheme(android.content.res.Resources.Theme t)
applyTheme
in class android.graphics.drawable.Drawable
public void setTint(int tint)
setColorFilter(ColorFilter)
overrides
tint.setTint
in class android.graphics.drawable.Drawable
tint
- Color to use for tinting this drawablesetTintMode(PorterDuff.Mode)
public void setTintList(android.content.res.ColorStateList tint)
setColorFilter(ColorFilter)
overrides
tint.setTintList
in class android.graphics.drawable.Drawable
tint
- Color state list to use for tinting this drawable, or null to clear the tintsetTintMode(PorterDuff.Mode)
public void setTintMode(android.graphics.PorterDuff.Mode tintMode)
setColorFilter(ColorFilter)
overrides
tint.setTintMode
in class android.graphics.drawable.Drawable
tintMode
- Color state list to use for tinting this drawable, or null to clear the tinttintMode
- A Porter-Duff blending modepublic void setHotspot(float x, float y)
setHotspot
in class android.graphics.drawable.Drawable
x
- The X coordinate of the center of the hotspoty
- The Y coordinate of the center of the hotspotpublic void setHotspotBounds(int left, int top, int right, int bottom)
setHotspotBounds
in class android.graphics.drawable.Drawable
left
- top
- right
- bottom
- public void getHotspotBounds(android.graphics.Rect outRect)
getHotspotBounds
in class android.graphics.drawable.Drawable