title: Android ImageView scale and zoom replace image
body: <p>I'm trying to build an simple image-zoom-replace functionality based on the Image-Zoom-Library "PhotoView":
  <a href="https://github.com/chrisbanes/PhotoView" rel="nofollow">https://github.com/chrisbanes/PhotoView</a></p>
  
  <p>I just want to load a small image into a imageView and zoom/scale it. This code works perfectly:</p>
  
  <pre><code>ImageView galleryPictureNew = (ImageView)findViewById(R.id.galleryImage);
  PhotoViewAttacher mAttacher = new PhotoViewAttacher(view);
  mAttacher.update();
  </code></pre>
  
  <p>The problem is, i want to replace the small image with a large (hd-image) if i zoom in.</p>
  
  <p>There is function called "setOnScaleChangeListener" like this:</p>
  
  <pre><code>                    mAttacher.setOnScaleChangeListener(new PhotoViewAttacher.OnScaleChangeListener() {
                      @Override
                      public void onScaleChange(float scaleFactor, float focusX, float focusY) {
                          //REPLACE IMAGE
  
                      }
                  });
  </code></pre>
  
  <p>This code above works, too BUT i want to "jump" to the last "position" and "zooming-level"?!</p>
  
  <p>Does anyone has a solution for it? 
  Or maybe someone has an alternative library for this problem?
  Do i have to save the last "position-state"?</p>