syedowaisali / crystal-range-seekbar

537 stars 164 forks source link

BUG: Cannot set minStartValue to 10 #163

Open walkerdan5 opened 2 years ago

walkerdan5 commented 2 years ago

There is a bug when you try to set minStartValue = 10f it'll show as 89f. Every other number works fine.

<com.crystal.crystalrangeseekbar.widgets.CrystalSeekbar
                android:id="@+id/sb_distance"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                app:bar_color="@color/ic_grey_light"
                app:bar_highlight_color="@color/ic_grey_light"
                app:corner_radius="8"
                app:data_type="_integer"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/textView11"
                app:left_thumb_color="@color/ic_purple_new"
                app:left_thumb_color_pressed="@color/ic_purple_new" />

Programmatically i set the following:

view.sb_distance.minValue = 10f
view.sb_distance.maxValue = 800f

When attempting to set the minStartValue = 10, the seekbar will display 89. Every other value works as expected.