Paint textPaint = new Paint();
textPaint.setColor(getResources().getColor(R.color.your_color));
textPaint.setAntiAlias(true);
textPaint.setTextSize(TEXT_SIZE);
textPaint.setStyle(Paint.Style.FILL);
Paint.FontMetrics fm = textPaint.getFontMetrics();
int txtHeight = (int) Math.ceil(fm.descent - fm.ascent);
String txt = "100";
float txtWidth = textPaint.measureText(txt, 0, txt.length());
canvas.drawText(txt, xCenter - txtWidth / 2, yCenter + txtHeight / 4, textPaint);