-
public class SeekBarCompatWrapper compatibility class to call some API-Specific methods And offer alternate procedures when possible
-
-
Method Summary
Modifier and Type Method Description static voidsetOutlineProvider(View view, MarkerDrawable markerDrawable)Sets the custom Outline provider on API 21. static DrawablegetRipple(ColorStateList colorStateList)Our DiscreteSeekBar implementation uses a circular drawable on API 21because we don't set it as Background, but draw it ourselves static voidsetRippleColor(@NonNull() Drawable drawable, ColorStateList colorStateList)Sets the color of the seekbar ripple static voidsetHotspotBounds(Drawable drawable, int left, int top, int right, int bottom)As our DiscreteSeekBar implementation uses a circular drawable on API 21we want to use the same method to set its bounds as the Ripple's hotspot bounds. static voidsetBackground(View view, Drawable background)android.support.v4.view.ViewCompat SHOULD include this once and for all!!But it doesn't... static voidsetTextDirection(TextView textView, int textDirection)Sets the TextView text direction attribute when possible static booleanisInScrollingContainer(ViewParent p)static booleanisHardwareAccelerated(View view)-
-
Method Detail
-
setOutlineProvider
static void setOutlineProvider(View view, MarkerDrawable markerDrawable)
Sets the custom Outline provider on API 21.Does nothing on API 21
-
getRipple
static Drawable getRipple(ColorStateList colorStateList)
Our DiscreteSeekBar implementation uses a circular drawable on API 21because we don't set it as Background, but draw it ourselves
-
setRippleColor
static void setRippleColor(@NonNull() Drawable drawable, ColorStateList colorStateList)
Sets the color of the seekbar ripple
- Parameters:
colorStateList- The ColorStateList the track ripple will be changed to
-
setHotspotBounds
static void setHotspotBounds(Drawable drawable, int left, int top, int right, int bottom)
As our DiscreteSeekBar implementation uses a circular drawable on API 21we want to use the same method to set its bounds as the Ripple's hotspot bounds.
-
setBackground
static void setBackground(View view, Drawable background)
android.support.v4.view.ViewCompat SHOULD include this once and for all!!But it doesn't...
-
setTextDirection
static void setTextDirection(TextView textView, int textDirection)
Sets the TextView text direction attribute when possible
-
isInScrollingContainer
static boolean isInScrollingContainer(ViewParent p)
-
isHardwareAccelerated
static boolean isHardwareAccelerated(View view)
-
-
-
-