public void drawText (String text, float x, float y, Paint paint) Since: API Level 1 Draw the text, with origin at (x,y), using the specified paint. The origin is interpreted based on the Align setting in the paint.
Parameters text The text to be drawn x The x-coordinate of the origin of the text being drawn y The y-coordinate of the origin of the text being drawn paint The paint used for the text (e.g. color, size, style) 用这个drawText方法,需要Canvas canvas,Paint paint两个对象,具体实现如下 for(int i = 0; i < 10; i++){ canvas.drawText (i,10,i*20,paint); }