Saturday 15 August 2015

Android How to zoom in 3x equivalent in ImageView -


I am working on a custom app where I want to zoom in on the overlayed image on camera view in Endorid. What do I want to do when I tap on the screen twice, I want to zoom at 3x the camera and zoom in on the image view.

I want to zoom on double tap I am using ImageViewugh Library.

How do I zoom in on the cameraView in the equivalent of a 3x zoom in ImageView? Try using this code it will give 3x the size of the image by clicking on a button.

  The public class increases the main activity activity {see Main View = Null; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); SetContentView (R.layout.activity_main); MainView = (ImageView) findViewById (R.id.imageView); Button buttonJimine = (button) FindById (R.id.buttonZoomIn); ButtonJoom InSetOneClicklist (New OnListList () {Click on Public Zero (see V) {Zoom (3f, 3f, New point (0,0));}}); } / ** Zooming done from here * / Public Zero Zoom (float scalax, float scalable, point pivot) {mainView.setPivotX (pivot.x); MainView.setPivotY (pivot.y); MainView.setScaleX (scaleX); MainView.setScaleY (scaleY); }}    

No comments:

Post a Comment