중요한 부분은 굵은 글씨부분 그 부분이 설정하는 부분이다..
DashPathEffect dashPath = new DashPathEffect(new float[]{8,3}, 1);
Paint paint = new Paint();
// 将边框设为黑色
paint.setColor(android.graphics.Color.BLACK);
paint.setPathEffect(dashPath);
paint.setStrokeWidth(1);
// 画TextView的4个边
canvas.drawLine(0, 0, this.getWidth() - 1, 0, paint);
canvas.drawLine(0, 0, 0, this.getHeight() - 1, paint);
canvas.drawLine(this.getWidth() - 1, 0, this.getWidth() - 1, this.getHeight() - 1, paint);
canvas.drawLine(0, this.getHeight() - 1, this.getWidth() - 1, this.getHeight() - 1, paint);