PhotoView - supports basic gestures, there is the possibility of more fine-tuning. To connect in the build.gradle file of your module, write in the dependencies section:
dependencies { compile 'com.github.chrisbanes.photoview:library:1.2.2' }
How does it work:
ImageView mImageView; PhotoViewAttacher mAttacher; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Any implementation of ImageView can be used! mImageView = (ImageView) findViewById(R.id.iv_photo); // Set the Drawable displayed Drawable bitmap = getResources().getDrawable(R.drawable.wallpaper); mImageView.setImageDrawable(bitmap); // Attach a PhotoViewAttacher, which takes care of all of the zooming functionality. mAttacher = new PhotoViewAttacher(mImageView); } // If you later call mImageView.setImageDrawable/setImageBitmap/setImageResource/etc then you just need to call attacher.update();
getsureImageand> R.com.that's there ... generally help to establish it - BarmaleygetsureImage, butgestureImage- be careful! - Barmaley