Skip to content
Rey Pham edited this page Jun 2, 2016 · 9 revisions



Declare in XML:

    <!-- use Material.Widget.Slider.Discrete style for discrete mode -->


  • sl_trackSize - The stroke's width of the track bar.

  • sl_trackCap - The cap setting of track bar.

  • sl_primaryColor - The foreground color of track bar and thumb.

  • sl_secondaryColor - The background color of track bar.

  • sl_thumbBorderSize - The border's width of thumb.

  • sl_thumbRadius - The radius of thumb.

  • sl_thumbFocusRadius - The radius of thumb when focused.

  • sl_thumbTouchRadius - The radius of touch region. if not set will use sl_thumbRadius.

  • sl_travelAnimDuration - The max time the thumb takes to move from left to right side.

  • sl_transformAnimDuration - The duration of animation when thumb switch to focused state.

  • sl_interpolator - The interpolator of animations.

  • sl_minValue - The min value of slider.

  • sl_maxValue - The max value of slider.

  • sl_stepValue - The step value of slider (used in discrete mode).

  • sl_value - The current value of slider.

  • sl_discreteMode - If true, slider is in discrete mode, false and slider is in continuous mode

  • sl_fontFamily - The fontFamily of text (used in discrete mode).

  • sl_textStyle - The style of text (used in discrete mode).

  • sl_textSize - The size of text (used in discrete mode).

  • sl_textColor - The color of text (used in discrete mode).

  • sl_alwaysFillThumb - Indicate that should always fill thumb at min value or not.

You can’t perform that action at this time.