Android examples for android.graphics:Canvas
draw Border on Canvas
import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Path; public class Main{ public static void drawBorder(int width, int height, Canvas canvas, Paint paint, Path workingPath) { paint.setStyle(Paint.Style.STROKE); workingPath.reset();// w w w . jav a 2 s . c o m workingPath.moveTo(0, 0); workingPath.lineTo(width, 0); workingPath.lineTo(width, height); workingPath.lineTo(0, height); workingPath.lineTo(0, 0); workingPath.close(); canvas.drawPath(workingPath, paint); } }