pioneerBhawna pioneerBhawna - 1 year ago 209
Android Question

How to change progress of the circular seekbar in Android?

How to change progress in the circular seek bar when I enter number in edittext and click on button?

Below is the snapshot of what I am trying to do

enter image description here

Answer Source

I got the answer of my question. If you want to show circular seekbar like mine in the above layout and want to send value which is coming from server use this code:

Change its layout according to your requirements in CircularSeekBar class

If you want to send value for its progress programatically. Then, replace setProgress() with the below method:

public void setProgress(int progress) //this is an Android function

        if (this.progress != progress) 
            this.progress = progress; 
            if (!CALLED_FROM_ANGLE) 
                int newPercent =this.progress; 
                int newAngle = (newPercent * 360)/100; 
            mListener.onProgressChange(this, this.getProgress()); 
            CALLED_FROM_ANGLE = false; 

Now, in activity where you are using this Circular Seek bar , set its progress using SetProgress() method . Like this:-

com.exp.CustomControls.CircularSeekBar dynamicSeekBar=(com.exp.CustomControls.CircularSeekBar)findViewById(;

dynamicSeekBar.setProgress(progress_score); // Here, you can send any value


All the best....

If you get any problem , let me know.......I have got expertise in it

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download