예제 #1
0
  @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;
  }
예제 #2
0
 @Override
 public boolean onTap(float x, float y) {
   return mGestureListener.onTap(x, y);
 }
예제 #3
0
 @Override
 public boolean onTouchDrag(int action, float x, float y) {
   return mGestureListener.onTouchDrag(this, action, x, y);
 }
예제 #4
0
 @Override
 public void setGestureEnabled(boolean enabled) {
   mGestureEnable = enabled;
   mGestureListener.setGestureEnabled(enabled);
 }