New feature 1/21/2019 !!!
Add oneTouchMode for single seekbarMode.No need to drag thumb,just move it by one touch.
New feature 1/17/2019 !!!
Add tick mark text on the top and below of the progress bar.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.fa-hessari:RangeSeekBar:TAG'
}
<com.jaygoo.widget.RangeSeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:rsb_mode="single"
/>
Use these attrs for the new features:
in xml use:
app:rsb_tick_mark_is_from_first_item="false"
app:rsb_tick_mark_is_top_and_below="true"
app:rsb_tick_mark_is_one_touch_mode="true"
or in code use:
rangeSeekBar.setTickMarkTopAndBelow(true, false);
rangeSeekBar.setOneTouchMode(true);
<com.jaygoo.widget.VerticalRangeSeekBar
android:layout_width="50dp"
android:layout_height="300dp"
app:rsb_mode="range"
app:rsb_orientation="right"
/>
VerticalRangeSeekBar
rotates RangeSeekBar
90 degrees, and its attribute usage is same as RangeSeekBar
.The only difference is the
rsb_orientation
, it controls the direction of rotation.
<com.jaygoo.widget.RangeSeekBar
android:id="@+id/seekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginEnd="10dp"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
app:rsb_indicator_height="20dp"
app:rsb_indicator_padding_left="20dp"
app:rsb_indicator_padding_right="20dp"
app:rsb_indicator_text_size="12sp"
app:rsb_mode="single"
app:rsb_progress_color="#28369f"
app:rsb_progress_default_color=#28369f"
app:rsb_progress_height="4dp"
app:rsb_thumb_drawable="@drawable/shape_circle"
app:rsb_thumb_size="30dp"
app:rsb_tick_mark_gravity="center"
app:rsb_tick_mark_is_from_first_item="false"
app:rsb_tick_mark_is_one_touch_mode="true"
app:rsb_tick_mark_is_top_and_below="true"
app:rsb_tick_mark_mode="other"
app:rsb_tick_mark_text_array="@array/my_array"
app:rsb_tick_mark_text_margin="20dp"
app:rsb_tick_mark_text_size="14sp"
/>
If you want to know more attributes's usage , please to see attrs
You can know more usage and information from wiki.
Hope you like RangeSeekBar. Star
is the greatest support for me! Thank you !
Copyright 2018 JayGoo
Licensed under the Apache License.