-
Notifications
You must be signed in to change notification settings - Fork 389
StepApi
谷进杰 edited this page Jun 18, 2019
·
3 revisions
When steps > 1, it is will be step-by-step mode. 当步数大于1时会自动变为分步模式
//java
rangeSeekBar.setSteps(4);
//xml
app:rsb_steps="4"
set the step div view's width.
//java
rangeSeekBar.setStepsWidth(10f);
//xml
app:rsb_step_width="10dp"
set the step div view's height.
//java
rangeSeekBar.setStepsHeight(10f);
//xml
app:rsb_step_height="10dp"
set the step div view's radius.
//java
rangeSeekBar.setStepsRadius(10f);
//xml
app:rsb_step_radius="10dp"
set the step div view's color.
//java
rangeSeekBar.setStepsColor(Color.WHITE);
//xml
app:rsb_step_color="@color/xxx"
set the step div view's background drawable. If you set this, the setStepsColor
and setStepsRadius
will not work.
//java
rangeSeekBar.setStepsDrawableId(@DrawableRes int stepsDrawableId);
rangeSeekBar.setStepsBitmaps(List<Bitmap> stepsBitmaps)
rangeSeekBar.setStepsDrawable(List<Integer> stepsDrawableIds)
//xml
app:rsb_step_drawable="@drawable/thumb_ghost"
When thumb approaches the scale, it will automatically bond.当拇指接近刻度时,它会自动粘合。
//java
rangeSeekBar.setStepsAutoBonding(true);
//xml
app:rsb_step_auto_bonding="true"