Skip to content

ThumbApi

谷进杰 edited this page Jun 18, 2019 · 1 revision

Thumb Style(按钮样式)

The thumb is belong to RangeSeekBar.leftSeekBar and RangeSeekBar.rightSeekBar. You can set a different style for each SeekBar.

Height and Width 设置按钮宽高

rangeSeekBar.leftSeekBar.setThumbHeight();
rangeSeekBar.leftSeekBar.setThumbWidth();

//xml
app:rsb_thumb_width="40dp"
app:rsb_thumb_height="40dp"

Scale Ratio 设置按钮放大比例

When you touch down the thumb, the thumb will scale with the ratio.

当你触摸按钮时,按钮会随着比例缩放。

//xml
app:rsb_thumb_scale_ratio="1.2"

drawable 设置按钮

rsb_thumb_drawable is when you touch down the thumb button

rsb_thumb_drawable是当你按下按钮时的背景。

//xml
app:rsb_thumb_drawable="@drawable/xxx"

Inactivated drawable 设置按钮drawable

rsb_thumb_inactivated_drawable is when you don't touch down the thumb button

rsb_thumb_inactivated_drawable是当你没有按下按钮时的背景。

//xml
app:rsb_thumb_inactivated_drawable="@drawable/xxx"