Skip to content

ProgressApi

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

Progress Style(进度条样式)

setProgressHeight 设置进度条高度

//java
rangeSeekBar.setProgressHeight(4);

//xml
app:rsb_progress_height="4dp"


setProgressRadius 设置进度条圆角

//java
rangeSeekBar.setProgressRadius(dp2px(4));

//xml
app:rsb_progress_radius="4dp"


setProgressColor 设置进度条颜色

the color of progress bar when in progress. 进度条进度的颜色

//java
rangeSeekBar.setProgressColor(Color.RED);

//xml
app:rsb_progress_color="#f1f1f1"


setProgressDefaultColor 设置进度条背景颜色

//java
rangeSeekBar.setProgressColor(Color.GRAY);

//xml
app:rsb_progress_default_color="#f1f1f1"


setProgressDrawableId 设置进度条图片

the drawable of progress bar when in progress.

//java
rangeSeekBar.setProgressDrawableId(R.drawable.xxx);

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


setProgressDefaultDrawable 设置进度条默认背景Drawable

//java
rangeSeekBar.setProgressDefaultDrawableId(R.drawable.xxx);

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