类 SeekBarCompat


  • public class SeekBarCompat
    extends java.lang.Object
    Wrapper compatibility class to call some API-Specific methods And offer alternate procedures when possible
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static android.graphics.drawable.Drawable getRipple​(android.content.res.ColorStateList colorStateList)
      Our DiscreteSeekBar implementation uses a circular drawable on API 21 because we don't set it as Background, but draw it ourselves
      static boolean isHardwareAccelerated​(android.view.View view)  
      static boolean isInScrollingContainer​(android.view.ViewParent p)  
      static void setBackground​(android.view.View view, android.graphics.drawable.Drawable background)
      android.support.v4.view.ViewCompat SHOULD include this once and for all!!
      static void setHotspotBounds​(android.graphics.drawable.Drawable drawable, int left, int top, int right, int bottom)
      As our DiscreteSeekBar implementation uses a circular drawable on API 21 we want to use the same method to set its bounds as the Ripple's hotspot bounds.
      static void setOutlineProvider​(android.view.View view, MarkerDrawable markerDrawable)
      Sets the custom Outline provider on API 21.
      static void setRippleColor​(android.graphics.drawable.Drawable drawable, android.content.res.ColorStateList colorStateList)
      Sets the color of the seekbar ripple
      static void setTextDirection​(android.widget.TextView textView, int textDirection)
      Sets the TextView text direction attribute when possible
      • 从类继承的方法 java.lang.Object

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

      • SeekBarCompat

        public SeekBarCompat()
    • 方法详细资料

      • setOutlineProvider

        public static void setOutlineProvider​(android.view.View view,
                                              MarkerDrawable markerDrawable)
        Sets the custom Outline provider on API 21. Does nothing on API 21
      • getRipple

        public static android.graphics.drawable.Drawable getRipple​(android.content.res.ColorStateList colorStateList)
        Our DiscreteSeekBar implementation uses a circular drawable on API 21 because we don't set it as Background, but draw it ourselves
      • setRippleColor

        public static void setRippleColor​(@NonNull
                                          android.graphics.drawable.Drawable drawable,
                                          android.content.res.ColorStateList colorStateList)
        Sets the color of the seekbar ripple
        参数:
        colorStateList - The ColorStateList the track ripple will be changed to
      • setHotspotBounds

        public static void setHotspotBounds​(android.graphics.drawable.Drawable drawable,
                                            int left,
                                            int top,
                                            int right,
                                            int bottom)
        As our DiscreteSeekBar implementation uses a circular drawable on API 21 we want to use the same method to set its bounds as the Ripple's hotspot bounds.
      • setBackground

        public static void setBackground​(android.view.View view,
                                         android.graphics.drawable.Drawable background)
        android.support.v4.view.ViewCompat SHOULD include this once and for all!! But it doesn't...
      • setTextDirection

        public static void setTextDirection​(android.widget.TextView textView,
                                            int textDirection)
        Sets the TextView text direction attribute when possible
        另请参阅:
        View.setTextDirection(int)
      • isInScrollingContainer

        public static boolean isInScrollingContainer​(android.view.ViewParent p)
      • isHardwareAccelerated

        public static boolean isHardwareAccelerated​(android.view.View view)