title: Draw circle with different border colors Android
body: <pre><code>public static Bitmap drawCircle(int width,int height, int borderWidth) {
      Bitmap canvasBitmap = Bitmap.createBitmap( width, height, Bitmap.Config.ARGB_8888);
      BitmapShader shader = new BitmapShader(canvasBitmap, TileMode.CLAMP,      
              TileMode.CLAMP);
      Paint paint = new Paint();
      paint.setAntiAlias(true);
      paint.setShader(shader);
      paint.setShader(null);
      paint.setStyle(Paint.Style.STROKE);
      paint.setColor(Color.WHITE);
      paint.setStrokeWidth(borderWidth);  
      Canvas canvas = new Canvas(canvasBitmap);
      float radius = width &gt; height ? ((float) height) / 2f : ((float) width) / 2f;
      canvas.drawCircle(width / 2, height / 2, radius - borderWidth / 2, paint);
      return canvasBitmap;
  }
  </code></pre>
  
  <p>Simple this code draws a circle with white border, however I want part of the border to be black and the other part white. 40 % of it black, 60 % of it white</p>
  
  <p>How can this be done?</p>