title: android draw circle badge on top on bitmap
body: <p>I want to add a badge with the number of pending events above the menu icon of the application, but as you can see in the image below I have some problems. I'm unable to make the circle opaque, I don't want to see the grey lines behind the circle and the new image is cut on the top</p>
  
  <p>I want to use it on the logo icon of the action bar (the home icon), not in any other menu item of the action bar so custom action view is not an option</p>
  
  <p><img src="https://i.stack.imgur.com/93lez.png" alt="enter image description here"></p>
  
  <pre><code>    Bitmap bm = BitmapFactory.decodeResource(getResources(), drawableId);
      bm = bm.copy(bm.getConfig(), true);
  
      Paint circlePaint = new Paint();
      circlePaint.setAntiAlias(true);
      circlePaint.setColor(Color.RED);
      circlePaint.setStyle(Paint.Style.FILL);
      //circlePaint.setAlpha(255);
  
      Paint textPaint = new Paint(); 
      textPaint.setStyle(Style.FILL);  
      textPaint.setColor(Color.WHITE); 
      textPaint.setTextSize(23); 
      textPaint.setFakeBoldText(true);
  
      Canvas canvas = new Canvas(bm);
      canvas.drawCircle(bm.getWidth()/6, bm.getHeight()/5, 13, circlePaint);
      canvas.drawText(text, bm.getWidth()/7 + 5, bm.getHeight()/3, textPaint);
  
      return new BitmapDrawable(context.getResources(), bm);
  </code></pre>
  
  <p>Any help will be appreciated!</p>
  
  <p>Thanks</p>