Java tutorial
//package com.java2s; import android.graphics.Canvas; import android.graphics.Paint; public class Main { public static void drawMultiline(Canvas canvas, String str, int x, int y, Paint paint) { for (String line : str.split("\n")) { canvas.drawText(line, x, y, paint); y += -paint.ascent() + paint.descent(); } } }