Discrete SeekBar

前端 未结 2 2010
眼角桃花
眼角桃花 2021-01-11 16:02

I am trying to create a discrete seek bar for an Android app.

I know I can set max and min values for a SeekBar (my ideal solution would be the

2条回答
  •  -上瘾入骨i
    2021-01-11 16:34

    The Android SeekBar cannot set intervals, but you can set the maximum value to 10 so that the range is [0, 10], and whenever you want to get a value from it, multiply the SeekBar's value by 10, so you can "simulate" having intervals of 0, 10, 20, 30, ...

提交回复
热议问题