public class ThumbDrawable extends StateDrawable implements android.graphics.drawable.Animatable
Special StateDrawable implementation
to draw the Thumb circle.
It's special because it will stop drawing once the state is pressed/focused BUT only after a small delay.
This special delay is meant to help avoiding frame glitches while the Marker is added to the Window
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SIZE_DP |
| Constructor and Description |
|---|
ThumbDrawable(android.content.res.ColorStateList tintStateList,
int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
animateToNormal() |
void |
animateToPressed() |
void |
doDraw(android.graphics.Canvas canvas,
android.graphics.Paint paint)
Subclasses should implement this method to do the actual drawing
|
int |
getIntrinsicHeight() |
int |
getIntrinsicWidth() |
boolean |
isRunning() |
void |
start() |
void |
stop() |
draw, getAlpha, getOpacity, isStateful, setAlpha, setColorFilter, setColorStateList, setStateapplyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getLevel, getMinimumHeight, getMinimumWidth, getOutline, getPadding, getState, getTransparentRegion, inflate, inflate, invalidateSelf, isAutoMirrored, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLevel, setTint, setTintList, setTintMode, setVisible, unscheduleSelfpublic static final int DEFAULT_SIZE_DP
public ThumbDrawable(android.content.res.ColorStateList tintStateList,
int size)
public int getIntrinsicWidth()
getIntrinsicWidth in class android.graphics.drawable.Drawablepublic int getIntrinsicHeight()
getIntrinsicHeight in class android.graphics.drawable.Drawablepublic void doDraw(android.graphics.Canvas canvas,
android.graphics.Paint paint)
StateDrawablecanvas - The current Canvas to draw intopaint - The Paint preconfigurred with the current
ColorStateList colorpublic void animateToPressed()
public void animateToNormal()
public void start()
start in interface android.graphics.drawable.Animatablepublic void stop()
stop in interface android.graphics.drawable.Animatablepublic boolean isRunning()
isRunning in interface android.graphics.drawable.Animatable