public class SeekBarDrawable extends SeekBarStateDrawable implements Animatable
Special SeekBarStateDrawable implementation
To draw the Track, Scrubber and 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 BalloonMarkerDrawable is added to the Window
Drawable.Callback, Drawable.ConstantState| 构造器和说明 |
|---|
SeekBarDrawable(ColorStateList trackStateList,
ColorStateList scrubberStateList,
ColorStateList thumbStateList) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
animateToNormal() |
void |
animateToPressed() |
void |
copyTouchBounds(Rect rect) |
void |
draw(Canvas canvas,
Paint paint,
int trackColor,
int scrubberColor,
int thumbColor)
Subclasses should implement this method to do the actual drawing
|
float |
getHotScale() |
int |
getIntrinsicHeight() |
Point |
getPosPoint() |
int |
getScrubberStroke() |
int |
getThumbRadius() |
int |
getTickRadius() |
int |
getTouchRadius() |
int |
getTrackStroke() |
boolean |
isHaveTick() |
boolean |
isRunning() |
protected void |
onBoundsChange(Rect bounds) |
void |
setHotScale(float scale) |
void |
setNumSegments(int numSegments) |
void |
setRtl(boolean isRtl) |
void |
setScrubberStroke(int scrubberStroke) |
void |
setThumbRadius(int thumbRadius) |
void |
setTickRadius(int tickRadius) |
void |
setTouchRadius(int touchRadius) |
void |
setTrackStroke(int trackStroke) |
void |
start() |
void |
stop() |
draw, getAlpha, getColor, getCurrentColor, getOpacity, getScrubberColor, getThumbColor, getTrackColor, isStateful, setAlpha, setColorFilter, setScrubberColor, setState, setThumbColor, setTrackColorapplyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getIntrinsicWidth, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOutline, getPadding, getState, getTransparentRegion, inflate, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isVisible, jumpToCurrentState, mutate, onLayoutDirectionChanged, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setTint, setTintList, setTintMode, setVisible, unscheduleSelfpublic SeekBarDrawable(ColorStateList trackStateList, ColorStateList scrubberStateList, ColorStateList thumbStateList)
public void setRtl(boolean isRtl)
public void setNumSegments(int numSegments)
public int getTickRadius()
public void setTickRadius(int tickRadius)
public int getThumbRadius()
public void setThumbRadius(int thumbRadius)
public int getTouchRadius()
public void setTouchRadius(int touchRadius)
public int getScrubberStroke()
public void setScrubberStroke(int scrubberStroke)
public int getTrackStroke()
public void setTrackStroke(int trackStroke)
public float getHotScale()
public void setHotScale(float scale)
public boolean isHaveTick()
public Point getPosPoint()
public void copyTouchBounds(Rect rect)
public void animateToPressed()
public void animateToNormal()
public void start()
start 在接口中 Animatablepublic void stop()
stop 在接口中 Animatablepublic boolean isRunning()
isRunning 在接口中 Animatableprotected void onBoundsChange(Rect bounds)
onBoundsChange 在类中 Drawablepublic int getIntrinsicHeight()
getIntrinsicHeight 在类中 Drawablepublic void draw(Canvas canvas, Paint paint, int trackColor, int scrubberColor, int thumbColor)
SeekBarStateDrawabledraw 在类中 SeekBarStateDrawablecanvas - The current Canvas to draw intopaint - The Paint the Paint object that defines with the current
ColorStateList color