예제 #1
0
  @Override
  public void onDestroy() {
    super.onDestroy();

    // Need to call clean-up
    isAttacherDisposed = true;
    mAttacher.cleanup();
  }
  public ImageView getImageView() {
    ImageView imageView = null;

    if (null != mImageView) {
      imageView = mImageView.get();
    }

    // If we don't have an ImageView, call cleanup()
    if (null == imageView) {
      cleanup();
      Log.i(
          LOG_TAG,
          "ImageView no longer exists. You should not use this PhotoViewAttacher any more.");
    }

    return imageView;
  }
  @Override
  protected void onDestroy() {
    mAttacher.cleanup();

    super.onDestroy();
  }
예제 #4
0
 @Override
 protected void onDetachedFromWindow() {
   mAttacher.cleanup();
   mAttacher = null;
   super.onDetachedFromWindow();
 }