类 MarkerDrawable

  • 所有已实现的接口:
    android.graphics.drawable.Animatable

    public class MarkerDrawable
    extends StateDrawable
    implements android.graphics.drawable.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
    • 嵌套类概要

      嵌套类 
      修饰符和类型 说明
      static interface  MarkerDrawable.MarkerAnimationListener
      A listener interface to porpagate animation events This is the "poor's man" AnimatorListener for this Drawable
      • 从类继承的嵌套类/接口 android.graphics.drawable.Drawable

        android.graphics.drawable.Drawable.Callback, android.graphics.drawable.Drawable.ConstantState
    • 构造器概要

      构造器 
      构造器 说明
      MarkerDrawable​(android.content.res.ColorStateList tintList, int closedSize)  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void animateToNormal()  
      void animateToPressed()  
      android.graphics.Path getPath()  
      boolean isRunning()  
      protected void onBoundsChange​(android.graphics.Rect bounds)  
      void setColors​(int startColor, int endColor)
      The two colors that will be used for the seek thumb.
      void setExternalOffset​(int offset)  
      void setMarkerListener​(MarkerDrawable.MarkerAnimationListener listener)  
      void start()  
      void stop()  
      • 从类继承的方法 android.graphics.drawable.Drawable

        applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getIntrinsicHeight, getIntrinsicWidth, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOpticalInsets, getOutline, getPadding, getState, getTransparentRegion, hasFocusStateSpecified, inflate, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isProjected, isVisible, jumpToCurrentState, mutate, onLayoutDirectionChanged, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setTint, setTintBlendMode, setTintList, setTintMode, setVisible, unscheduleSelf
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • MarkerDrawable

        public MarkerDrawable​(@NonNull
                              android.content.res.ColorStateList tintList,
                              int closedSize)
    • 方法详细资料

      • setExternalOffset

        public void setExternalOffset​(int offset)
      • setColors

        public void setColors​(int startColor,
                              int endColor)
        The two colors that will be used for the seek thumb.
        参数:
        startColor - Color used for the seek thumb
        endColor - Color used for popup indicator
      • getPath

        public android.graphics.Path getPath()
      • onBoundsChange

        protected void onBoundsChange​(android.graphics.Rect bounds)
        覆盖:
        onBoundsChange 在类中 android.graphics.drawable.Drawable
      • animateToPressed

        public void animateToPressed()
      • animateToNormal

        public void animateToNormal()
      • start

        public void start()
        指定者:
        start 在接口中 android.graphics.drawable.Animatable
      • stop

        public void stop()
        指定者:
        stop 在接口中 android.graphics.drawable.Animatable
      • isRunning

        public boolean isRunning()
        指定者:
        isRunning 在接口中 android.graphics.drawable.Animatable