Circular progress bar

I want to create a circular progress bar, as in this image below

Circle progress bar

I do not know what is the method that this progress indicator creates. And I do not know what assets should be prepared.

+7
source share
5 answers

Look at this sample, you will have a good sample here:

Todd Davis | Progresswheel

It will look as follows.

Sample 1Sample 2Sample 3Sample 4

Hope this helps you.

+14
source

I think you can use the ArcView Link .

This will help you.

+1
source

Try the following link .. I will be useful to you .. We need to customize the views to create a new one. Instead of customizing our own view, we can add library projects and use views.

Follow this library project,

http://www.androidviews.net/2013/03/holo-circular-progressbar/

http://www.androidviews.net/2013/02/circular-seekbar/

And this is for customizing our own view,

http://www.vogella.com/articles/AndroidCustomViews/article.html

+1
source

try this method to draw a bitmap and set it to image view mode. use it in a dialog box to create a circular run dialog.

private void circularImageBar(ImageView iv2, int i) { Bitmap b = Bitmap.createBitmap(300, 300,Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(b); Paint paint = new Paint(); paint.setColor(Color.parseColor("#c4c4c4")); paint.setStrokeWidth(10); paint.setStyle(Paint.Style.STROKE); canvas.drawCircle(150, 150, 140, paint); paint.setColor(Color.parseColor("#FFDB4C")); paint.setStrokeWidth(10); paint.setStyle(Paint.Style.FILL); final RectF oval = new RectF(); paint.setStyle(Paint.Style.STROKE); oval.set(10,10,290,290); canvas.drawArc(oval, 270, ((i*360)/100), false, paint); paint.setStrokeWidth(0); paint.setTextAlign(Align.CENTER); paint.setColor(Color.parseColor("#8E8E93")); paint.setTextSize(140); canvas.drawText(""+i, 150, 150+(paint.getTextSize()/3), paint); iv2.setImageBitmap(b); } 
+1
source

You can do this by creating your own view. about assets, I think all you need is some color codes. create an extends View class. Add the setProgress (int) method. in OnDraw () draw one filled circle. and one arc from 0 to _progress. drawText progress in the center. You can easily find sample code. find him.

0
source

All Articles