@Override protected void onDraw(Canvas canvas) { if (mCanvasAdapter.beginPaint(canvas)) { canvas.drawColor(Color.TRANSPARENT, Mode.CLEAR); mCoreView.dynDraw(mViewAdapter, mCanvasAdapter); mCanvasAdapter.endPaint(); } }
@Override protected void onDetachedFromWindow() { if (mCanvasAdapter != null) { mCanvasAdapter.delete(); mCanvasAdapter = null; } mCoreView = null; mViewAdapter = null; super.onDetachedFromWindow(); }
public void doDraw() { if (!mCanvasAdapter.isDrawing()) { mBeginTime = android.os.SystemClock.uptimeMillis(); new Thread(new DrawThread()).start(); } }
public boolean isDrawing() { return mCanvasAdapter != null && mCanvasAdapter.isDrawing(); }