I downloaded and connected the Holo Circle Progress bar library, but I would like to have a circle instead of this terrible square, as in the standard google deskclock application from this enter image description here

I looked at the source, but it did nothing, only a mysterious drawable with this circle, which is not used even in the xml markup

How to replace a square by a circle?

1 answer 1

If we are talking about this library , I can advise the following: After the "// draw the thumb square at the correct rotated position", you should draw not square (square), but circle (circle) using the drawCircle (float cx, float cy, float radius, Paint paint) method drawCircle (float cx, float cy, float radius, Paint paint) of the Canvas class. It is simpler than a square, since nothing needs to be turned.

I suspect there will be something like:

 if (isThumbEnabled()) { // draw the thumb circle at the correct rotated position canvas.save(); canvas.rotate(progressRotation - 90); canvas.drawCircle (mThumbPosX, mThumbPosY, mThumbRadius, mThumbColorPaint); canvas.restore(); } 
  • thank! Just I thought for this method - maxim oguenko