public class ThumbDrawable extends StateDrawable implements android.graphics.drawable.Animatable
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| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEFAULT_SIZE_DP |
| 构造器和说明 |
|---|
ThumbDrawable(android.content.res.ColorStateList tintStateList,
int size) |
| 限定符和类型 | 方法和说明 |
|---|---|
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, getHotspotBounds, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOpticalInsets, getOutline, getPadding, getState, getTransparentRegion, inflate, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isProjected, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLayoutDirectionChanged, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setTint, setTintBlendMode, setTintList, setTintMode, setVisible, unscheduleSelfpublic static final int DEFAULT_SIZE_DP
public ThumbDrawable(@NonNull
android.content.res.ColorStateList tintStateList,
int size)
public int getIntrinsicWidth()
getIntrinsicWidth 在类中 android.graphics.drawable.Drawablepublic int getIntrinsicHeight()
getIntrinsicHeight 在类中 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 在接口中 android.graphics.drawable.Animatablepublic void stop()
stop 在接口中 android.graphics.drawable.Animatablepublic boolean isRunning()
isRunning 在接口中 android.graphics.drawable.Animatable