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