-
- All Implemented Interfaces:
-
android.graphics.drawable.Animatable
public class MarkerDrawable extends StateDrawable implements Animatable
Implementation of StateDrawable to draw a morphing marker symbol.
It's basically an implementation of an Animatable Drawable with the following details:
- Animates from a circle shape to a "marker" shape just using a RoundRect
- Animates color change from the normal state color to the pressed state color
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceMarkerDrawable.MarkerAnimationListenerA listener interface to porpagate animation eventsThis is the "poor's man" AnimatorListener for this Drawable
-
Constructor Summary
Constructors Constructor Description MarkerDrawable(ColorStateList tintList, int closedSize)
-
Method Summary
Modifier and Type Method Description voidsetExternalOffset(int offset)voidsetColors(int startColor, int endColor)The two colors that will be used for the seek thumb. PathgetPath()voidanimateToPressed()voidanimateToNormal()voidsetMarkerListener(MarkerDrawable.MarkerAnimationListener listener)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
-
MarkerDrawable
MarkerDrawable(ColorStateList tintList, int closedSize)
-
-
Method Detail
-
setExternalOffset
void setExternalOffset(int offset)
-
setColors
void setColors(int startColor, int endColor)
The two colors that will be used for the seek thumb.
- Parameters:
startColor- Color used for the seek thumbendColor- Color used for popup indicator
-
animateToPressed
void animateToPressed()
-
animateToNormal
void animateToNormal()
-
setMarkerListener
void setMarkerListener(MarkerDrawable.MarkerAnimationListener listener)
-
start
void start()
-
stop
void stop()
-
isRunning
boolean isRunning()
-
-
-
-