Search code examples
javaandroidseekbarandroid-seekbar

Requesting guidance in creating custom SeekBar in Android. (like shown in the image)


I have a task to create a SeekBar looking like this:

enter image description here

My question is: How to segment the seekbar like that? I have made custom seekbars before, but I don't know how to segment the bar like that, with lines extending beyond the seekbar's height.

I have stumbled across a library, the ComboSeekBar, but it doesn't help much.

Thanks in advance to anyone willing to help!

Cheers!


Solution

  • I already see two ways to do it

    1. Using background Drawable

      Create and choose your seekbar drawable using setBackgroundDrawable().

    2. Use third-party libraries:

    RangeSliderView: (min. SDK API 14):

    https://github.com/channguyen/range-slider-view

    enter image description here

    RangeSeekbar:

    https://github.com/dolphinwang/RangeSeekbar

    RangeBar:

    https://github.com/edmodo/range-bar

    Check also this unfinished project: https://github.com/feelinglucky/RadioSeekBar

    Hope it help