-
Notifications
You must be signed in to change notification settings - Fork 396
TickMarkApi
谷进杰 edited this page Jun 18, 2019
·
1 revision
If you want to use the Tick Mark, you need to set the app:rsb_tick_mark_mode
first.
Options:
number
|other
-
number
according to the scale of the actual proportion of the distribution of the location (markTextArray must be a number)number
根据实际比例分布的位置而定(markTextArray必须是一个数字) -
other
bisects the current layout (markTextArray can be any character)other
平分当前布局(markTextArray可以是任何字符)
//java
rangeSeekBar.setTickMarkMode(TRICK_MARK_MODE_NUMBER|TRICK_MARK_MODE_OTHER)
//xml
app:rsb_tick_mark_mode="number|other"
//java
rangeSeekBar.setTickMarkGravity(TICK_MARK_GRAVITY_LEFT|TICK_MARK_GRAVITY_RIGHT|TICK_MARK_GRAVITY_CENTER)
//xml
app:rsb_tick_mark_gravity="left|center|right"
The tick mark text's gravity in RangeSeekBar.
//java
rangeSeekBar.setTickMarkLayoutGravity(Gravity.TOP|Gravity.BOTTOM)
//xml
app:rsb_tick_mark_layout_gravity="top|bottom"
//java
rangeSeekBar.setTickMarkTextArray()
//xml
app:rsb_tick_mark_text_array="@array/xxx"
The tick mark text margin bottom to progress bar.
//java
rangeSeekBar.setTickMarkTextMargin()
//xml
app:rsb_tick_mark_text_margin="10dp"
//java
rangeSeekBar.setTickMarkTextSize()
//xml
app:rsb_tick_mark_text_size="10sp"
//java
rangeSeekBar.setTickMarkTextColor()
//xml
app:rsb_tick_mark_text_color="@color/xxx"
It just work in range && number mode
//java
rangeSeekBar.setTickMarkInRangeTextColor()
//xml
app:rsb_tick_mark_in_range_text_color="@color/xxx"