摘要:
直接上demo,图是自己切的,将就用吧。点击左右两边分别向左右移动。public class MySurfaceView extends SurfaceView implements Callback, Runnable { private Thread th; private SurfaceHolder sfh; private int SH, SW; private Canvas canvas; private Paint p; private Paint p2; private Resources res; private Bitmap b... 阅读全文
摘要:
解释都在代码注释中: 1 public class SampleView extends View { 2 private Paint mPaint; 3 private Path mPath; 4 5 public SampleView(Context context) { 6 super(context); 7 setFocusable(true); 8 9 mPaint = new Paint();10 mPaint.setAntiAlias(true);11 mPaint.set... 阅读全文