摘要: 直接上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... 阅读全文
posted @ 2013-09-08 13:43 一只奋斗的猿 阅读(2757) 评论(0) 推荐(2) 编辑
摘要: 解释都在代码注释中: 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... 阅读全文
posted @ 2013-09-08 11:30 一只奋斗的猿 阅读(1025) 评论(0) 推荐(0) 编辑