currently use the DrawText of and drawRect put in same (x,y) like overlap to implement
now i want to ask is able to insert text directly in the graphics ?
or how to let text fit to rect?
ex: canvas.drawRect(20, 205, 200, 280, paint);
then i want to put text in this rect
To “put” text into a rect, you simply draw the text after the rect.
If coordinates of rect are (0,0) then the coordinates of the text could be (2,2).
If your text is to long to fit into the rect, you’ll have to setTextSize on the paint object.
I hope this helps.