6

Is it possible to give an arc shape to Seekbar using android shape elements ? If not is there any other way to change the shape of the seekbar ?

user2717079
  • 299
  • 1
  • 3
  • 13
  • 1
    You can try to extend the `SeekBar` and override methods `onDraw`, `onMeasure` and a few other ones related to custom drawing. Have a look at [this tutorial](http://developer.android.com/training/custom-views/custom-drawing.html) on android dev site. – Aleks G Oct 17 '13 at 10:30

1 Answers1

9

I have an open source CircularSeekBar that allows semi-circles:

http://devadvance.com/circularseekbar

The instructions on the site are basic, if you need any more help, just ask!

There are also a few other circular seekbar implementations that only allow full circles, but provide a good starting point, such as:

https://github.com/JesusM/HoloCircleSeekBar

Matt Joseph
  • 336
  • 1
  • 7
  • I am trying to set the Max progress of the seek bar to the duration of the song , but it is taking the default max value(100) , how to set the Max progress of the seekbar? – user2717079 Oct 22 '13 at 11:20
  • You can use the XML attributes to set the max initially. However, it seems you want to be able to set it using a "setMax" method. I updated the code for CircularSeekBar to include setMax and getMax methods so you can change the max programmatically. – Matt Joseph Oct 22 '13 at 13:41