I'm trying to implement a custom seekbar for android like one in the application :
Circle Alarm : HERE
Can you please help me if someone has already made it ??
on 01/17/2013 – Made popular on 01/17/2013
I have made a custom seekbar based on a circle. By knowing the radius, cursor location and so on I have been able to constrain the draggable thumb part to the circle successfully. You can touch anywhere in or around the circle, the angle is calculated and then the draggable part put on the circumference at the desired distance & angle using sin/cos.
When the screen rotates my seekbar's colored bar goes back to its initial value, while the thumb remains at the correct position.
Basically from this:
It becomes like this:
Note that the TextView showing 15 is connected to the seekbar and correctly shows the same value, which is updated in onCreateView retrieving the value with getProgress on the seekbar, so the seekbar has the correct prog