Hi I use your library to display a range of values. Let's say from 1 to 8 with step 1. I also display labels above each step, so in general I set an array of Strings to display.
I use in XML like :
<com.jaygoo.widget.RangeSeekBar
android:id="@+id/salary_sb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:rsb_indicator_arrow_size="0dp"
app:rsb_indicator_background_color="@color/color_transparent"
app:rsb_indicator_height="@dimen/icon_small"
app:rsb_indicator_padding_bottom="0dp"
app:rsb_indicator_show_mode="alwaysShow"
app:rsb_indicator_text_color="@color/text_color_normal"
app:rsb_indicator_text_size="@dimen/text_tiny"
app:rsb_mode="range"
app:rsb_progress_color="@color/color_blue"
app:rsb_progress_height="@dimen/divider_height_thick"
app:rsb_progress_radius="@dimen/corner_radius_small"
app:rsb_thumb_size="@dimen/icon_small"
app:rsb_tick_mark_text_color="@color/color_transparent" />
and I set my data like :
mSalarySb.setSeekBarMode(RangeSeekBar.SEEKBAR_MODE_RANGE);
mSalarySb.setTickMarkMode(RangeSeekBar.TRICK_MARK_MODE_OTHER);
mSalarySb.setRangeInterval(1);
mSalarySb.setTickMarkNumber(ranges.length -1);
mSalarySb.setTickMarkTextArray(ranges);
mSalarySb.invalidate();
This displays the first value and has one step with the last value. All steps between are lost.
I tried to set it up with dummy data in XML only (resource array of predefined Strings) and it seems to work fine.
STATIC DATA:
<string-array name="salary_ranges">
<item>$ 0</item>
<item>$ 3000</item>
<item>$ 5000</item>
<item>$ 7000</item>
<item>$ 10000</item>
</string-array>
XML:
<com.jaygoo.widget.RangeSeekBar
android:id="@+id/salary_sb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:rsb_indicator_arrow_size="0dp"
app:rsb_indicator_background_color="@color/color_transparent"
app:rsb_indicator_height="@dimen/icon_small"
app:rsb_indicator_padding_bottom="0dp"
app:rsb_indicator_show_mode="alwaysShow"
app:rsb_indicator_text_color="@color/text_color_normal"
app:rsb_indicator_text_size="@dimen/text_tiny"
app:rsb_mode="range"
app:rsb_progress_color="@color/color_blue"
app:rsb_progress_height="@dimen/divider_height_thick"
app:rsb_progress_radius="@dimen/corner_radius_small"
app:rsb_range_interval="1"
app:rsb_thumb_size="@dimen/icon_small"
app:rsb_tick_mark_mode="other"
app:rsb_tick_mark_number="4"
app:rsb_tick_mark_text_array="@array/salary_ranges"
app:rsb_tick_mark_text_color="@color/color_transparent" />
Did I miss something when I set it up programmatically ?