1

How can i add marks on seekbar like this yellow mark on seekbar in android.

enter image description here

But i want to to this on run time.

e.g

May be i need to add mark on 10sec and 26sec.

Thanks in advance.

Nisar Ahmad
  • 1,987
  • 3
  • 13
  • 30

2 Answers2

1

The Android SeekBar doesn't have an API for correctly placing marks on the bar. There is also no way of telling the actual pixel location of various positions on the bar, so you wouldn't want to guess at an overlay position.

Instead, you'll want to implement your own seekbar, maybe copying the Android source code for SeekBar as a starting point, and having it expose an api for attaching a marker at a position.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
0

I found a solution of this problem on stackoverflow. Not perfect but working.

android seek bar customization,

Community
  • 1
  • 1
Nisar Ahmad
  • 1,987
  • 3
  • 13
  • 30