zoom in and zoom out button not working in android
<p>Below is the code I am using for zoom in and zoom out buttons but it is zooming for a particular postion, I need these buttons to works same as how we zoom an image when an zoom button is pressed like in windows imageviewer. I don't need pinch zoom option. Can anyone help please. Thanks in advance.</p>

<pre><code>    Button zoonIn = (Button) findViewById(R.id.zoomIn);
    Button zoonOut = (Button) findViewById(R.id.zoomOut);

    zoonIn.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            zoom(2f, 2f, new PointF(0, 0));
        }
    });


    zoonOut.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            zoom(0.5f, 0.5f, new PointF(0, 0));
        }
    });


}
</code></pre>

<p>Zoom method</p>

<pre><code>public void zoom(Float scaleX, Float scaleY, PointF pivot) {
    ivImage.setPivotX(pivot.x);
    ivImage.setPivotY(pivot.y);
    ivImage.setScaleX(scaleX);
    ivImage.setScaleY(scaleY);
}
</code></pre>