<SeekBar
android:id="@ id/seekBar2"
style="@style/Widget.AppCompat.SeekBar.Discrete"
android:layout_width="match_parent"
android:layout_height="48dp"
android:thumb="@drawable/ic_circle"
android:max="7"
android:progress="3"/>
https://i.stack.imgur.com/NBU9Z.jpg
How to implement seekbar discrete with replacing tick mark from dot to numbers in navigation drawer . Is it possible at all.
CodePudding user response:
Play with values and use enum :
public static final String VAL1 = "A8";
public static final int VAL2= "A1";
public static final int VAL3= "A5";
public static final int VAL4= "A1";
public static enum Suit {VAL1,VAL2,VAL3,VAL4}
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser)
{
progressChangedValue = progress;
setProgresValue(Suit(progressChangedValue));
}
Or use a liberary like https://github.com/warkiz/IndicatorSeekBar
