title: Matrix setScale Function is not working as expected
body: <p>I have this code for resizing an image : 
  Java : </p>
  
  <pre><code> public class MainActivity extends Activity {
  
      private ImageView iv, iv2;
      private float scaley = 1f;
      private float scaley2 = 1f;
      private GestureDetectorCompat detector;
      Matrix m = new Matrix();
      Matrix m2 = new Matrix();
      private RelativeLayout root;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
  
          root = (RelativeLayout) findViewById(R.id.root);
          iv = (ImageView) findViewById(R.id.imageView);
          iv2 = (ImageView) findViewById(R.id.imageView2);
  
          iv.setScaleType(ImageView.ScaleType.MATRIX);
          iv2.setScaleType(ImageView.ScaleType.MATRIX);
          detector = new GestureDetectorCompat(this, new GestureDetector.SimpleOnGestureListener() {
  
              @Override
              public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
  
  
                  scaley -= distanceY / root.getHeight();
                  m.setScale(1, scaley, 0, 0);
                  iv.setImageMatrix(m);
  
  
                  scaley2 += distanceY / root.getHeight();
                  m2.setScale(1, scaley2);
                  int imageHeight = iv2.getDrawable().getMinimumHeight();
                  m2.postTranslate(0, iv2.getHeight() - (imageHeight * scaley2));
                  iv2.setImageMatrix(m2);
  
                return true;
              }
          });
      }
  
      @Override
      public boolean onTouchEvent(MotionEvent event) {
          return detector.onTouchEvent(event);
      }
  }
  </code></pre>
  
  <p>Layout : </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".MainActivity"
      android:id="@+id/root"&gt;
  
          &lt;ImageView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:id="@+id/imageView"
              android:layout_alignParentTop="true"
              android:scaleType="fitCenter"
              android:adjustViewBounds="true"
  
              android:src="@drawable/as" /&gt;
  
          &lt;ImageView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_below="@id/imageView"
              android:id="@+id/imageView2"
              android:src="@drawable/as"
              android:scaleType="fitCenter"
              android:adjustViewBounds="true"
              /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I want my <code>second</code> image to have a pivot on its bottom, so I use  this part :</p>
  
  <pre><code>scaley2 += distanceY / root.getHeight();
                  m2.setScale(1, scaley2);
                  int imageHeight = iv2.getDrawable().getMinimumHeight();
                  m2.postTranslate(0, iv2.getHeight() - (imageHeight * scaley2));
                  iv2.setImageMatrix(m2); 
  </code></pre>
  
  <p>It works, image looks anchored at the  bottom but, it's not growing, when I try to grow the image, it stays at its default size. How can I fix this? Thanks.</p>