0

I am trying to create a seekbar with horizontal progress bar on thumb. Visually it should look something like this.

enter image description here

So when i seek the thumb left to right the progress bar will act according to the value of seekbar.

So far i had try to overlap a progress bar on the top of seekbar, but this is not working as expected. Also i am not able to pass the touch event from progress bar to seekbar. As progress bar is overlapping the thumb i need to bypass the touch event from progress bar to seekbar thumb, which i am not able to achieve it.

Can anyone help me changing existing code or completely create a new custom seekbar by extending base class.

Jay Gajjar
  • 2,661
  • 2
  • 21
  • 35

1 Answers1

0

If you don't want to code the wohle thing yourself, there is a github project that displays the value inside the thumb. However, this is not very similar to the image you provided, but maybe could be styled.

The other option is coding it yourself. You will basically have to extend SeekBar and override the most important methods ( onDraw, onMeasure etc. ) There are plenty of tutorials on how to make custom views, like this one from the android developer pages.

Gumbo
  • 1,716
  • 1
  • 15
  • 22
  • I know link-only answers are not liked much, but i don't see why i should try to rewrite a tutorial that has been done better somewhere else. – Gumbo Sep 16 '15 at 06:43