public void onDraw(Canvas canvas) { canvas.save(); canvas.translate(margin, 0);
super.onDraw(canvas); canvas.restore(); }
//save()是为canvas保存一个副本,在resore时候恢复canvas用的对象就是用sava保存的副本