I'm drawing text on canvas with this code:
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.drawColor(Color.WHITE);
Paint paint = new Paint();
Rect bounds = new Rect();
paint.setColor(Color.BLACK);
paint.setTextSize(50);
paint.getTextBounds(first, 0, first.length(), bounds);
canvas.drawText(first, (canvas.getWidth() - bounds.width()) / 2, 50, paint);
}
Here is result:
But I want the text to have bigger height, I want something like this:
I don't want to change the font size, only the height of this text. How can i do this ?