title: Battery circle like Battery Widget Reborn
body: <p>I am trying to make draw a circle based on the battery percentage. I have the following code:</p>
  
  <pre><code>Bitmap.Config conf = Bitmap.Config.ARGB_8888; // see other conf types
  Bitmap bmp = Bitmap.createBitmap(200, 200, conf);
  
  Paint mPaint = new Paint();
  mPaint.setDither(true);
  mPaint.setColor(Color.BLUE);
  mPaint.setStyle(Paint.Style.STROKE);
  mPaint.setStrokeJoin(Paint.Join.ROUND);
  mPaint.setStrokeCap(Paint.Cap.ROUND);
  mPaint.setStrokeWidth(5);
  
  circle = new Path();
  circle.addCircle(100, 100, level, Direction.CW);
  
  Canvas canvas = new Canvas(bmp);
  canvas.drawPath(circle, mPaint);
  </code></pre>
  
  <p>I am trying to get similar to Battery Widget Reborn, where its a circle path drawn based on a percentage, could someone please help.</p>
  
  <p>Edit:</p>
  
  <p>below is a shot of what i am trying to accomplish</p>
  
  <p><img src="https://i.stack.imgur.com/uxO83.png" alt="image of the percentage circle"></p>