@Override public void tearDown() { if (mViewAdapter == null) { return; } ViewUtil.onRemoveView(this); mViewAdapter.stop(null); if (mImageCache != null) { synchronized (mImageCache) { mImageCache.clear(); } mImageCache = null; } if (mRegenBitmap != null) { synchronized (mRegenBitmap) { mRegenBitmap.recycle(); } mRegenBitmap = null; } if (mCachedBitmap != null) { synchronized (mCachedBitmap) { mCachedBitmap.recycle(); } mCachedBitmap = null; } synchronized (GiCoreView.class) { mCoreView.destoryView(mViewAdapter); mViewAdapter.delete(); mViewAdapter = null; mCoreView.delete(); mCoreView = null; } if (mCanvasOnDraw != null) { mCanvasOnDraw.delete(); mCanvasOnDraw = null; } if (mCanvasRegen != null) { mCanvasRegen.delete(); mCanvasRegen = null; } if (mGestureListener != null) { mGestureListener.release(); mGestureListener = null; } mGestureDetector = null; mMainView = null; }
@Override public boolean onTap(float x, float y) { return mGestureListener.onTap(x, y); }
@Override public boolean onTouchDrag(int action, float x, float y) { return mGestureListener.onTouchDrag(this, action, x, y); }
@Override public void setGestureEnabled(boolean enabled) { mGestureEnable = enabled; mGestureListener.setGestureEnabled(enabled); }