-
- All Implemented Interfaces:
-
android.graphics.drawable.Animatable
public class ThumbDrawable extends StateDrawable implements Animatable
HACKSpecial 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
-
-
Field Summary
Fields Modifier and Type Field Description public final static intDEFAULT_SIZE_DP
-
Constructor Summary
Constructors Constructor Description ThumbDrawable(ColorStateList tintStateList, int size)
-
Method Summary
Modifier and Type Method Description intgetIntrinsicWidth()intgetIntrinsicHeight()voiddoDraw(Canvas canvas, Paint paint)Subclasses should implement this method to do the actual drawing voidanimateToPressed()voidanimateToNormal()voidstart()voidstop()booleanisRunning()-
Methods inherited from class com.lyy.keepassa.widget.discreteSeekBar.internal.drawable.StateDrawable
draw, getAlpha, getOpacity, isStateful, setAlpha, setColorFilter, setColorStateList, setState -
Methods inherited from class android.graphics.drawable.Drawable
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, draw, getAlpha, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getIntrinsicHeight, getIntrinsicWidth, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOpacity, getOpticalInsets, getOutline, getPadding, getState, getTransparentRegion, hasFocusStateSpecified, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isProjected, isStateful, isVisible, jumpToCurrentState, mutate, onLayoutDirectionChanged, resolveOpacity, scheduleSelf, setAlpha, setAutoMirrored, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setTintBlendMode, setTintList, setTintMode, setVisible, unscheduleSelf -
Methods inherited from class android.graphics.drawable.Animatable
isRunning, start, stop -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ThumbDrawable
ThumbDrawable(ColorStateList tintStateList, int size)
-
-
Method Detail
-
getIntrinsicWidth
int getIntrinsicWidth()
-
getIntrinsicHeight
int getIntrinsicHeight()
-
doDraw
void doDraw(Canvas canvas, Paint paint)
Subclasses should implement this method to do the actual drawing
- Parameters:
canvas- The current Canvas to draw intopaint- The Paint preconfigurred with the current ColorStateList color
-
animateToPressed
void animateToPressed()
-
animateToNormal
void animateToNormal()
-
start
void start()
-
stop
void stop()
-
isRunning
boolean isRunning()
-
-
-
-