怎样在Android屏幕上循环的输出一个文字吗
void android.graphics.Canvas.drawText(String text,float x,float y,Paint paint)
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);
}
以模大上回答你戚纤满意么?