public static Bitmap drawCircle(int width,int height, int borderWidth) {
Bitmap canvasBitmap = Bitmap.createBitmap( 350, 350, Bitmap.Config.ARGB_8888);
BitmapSha
You could try this.
private Paint paint;
private Paint circlePaint;
paint = new Paint();
circlePaint = new Paint();
paint.setColor(Color.WHITE);
paint.setTextSize(18f);
paint.setAntiAlias(true);
paint.setTextAlign(Paint.Align.CENTER);
Rect bounds = new Rect();
paint.getTextBounds(text, 0, text.length(), bounds);
circlePaint.setColor(Color.RED);
circlePaint.setAntiAlias(true);
canvas.drawCircle(-3, 15 - (bounds.height() / 2), bounds.width() + 5, circlePaint);
canvas.drawText(text, -3, 15, paint);
Note : (-3,15) is the starting co-ordinates to draw the text and (+5) is the padding.
This should give you an output like the notification badge here ->