Imageview zoom library for android. It's simple show image library.
Demo
allprojects { repositories { maven { url 'https://jitpack.io' } } }
2) Add the view to your layout XML.
implementation 'com.github.hsmnzaydn:imagezoom:1.2.1'
3) Add the view to your layout XML.
<com.ozaydin.serkan.com.image_zoom_view.ImageViewZoom android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/aleyna_fox" />
<com.ozaydin.serkan.com.image_zoom_view.ImageViewZoom android:layout_width="wrap_content" android:layout_height="wrap_content" app:circle="true" android:src="@drawable/aleyna_fox" />Returns ImageViewZoom's base64
imageViewZoom.getBase64();
Step 1. Init ImageViewZoomConfig and set saveProperty field as "true"
ImageViewZoomConfig imageViewZoomConfig=new ImageViewZoomConfig();
imageViewZoomConfig.saveProperty(true);
Step 2. Init "ImageViewZoomConfig.ImageViewZoomConfigSaveMethod" Note: If you want show save option to user only when open dialog you have to set "ImageViewZoomConfig.ImageViewZoomConfigSaveMethod" as "onlyOnDialog" If you want save image when run code you have to set "ImageViewZoomConfig.ImageViewZoomConfigSaveMethod" as "always".
ImageViewZoomConfig.ImageViewZoomConfigSaveMethod imageViewZoomConfigSaveMethod = ImageViewZoomConfig.ImageViewZoomConfigSaveMethod.onlyOnDialog; // You can use always
imageViewZoomConfig.setImageViewZoomConfigSaveMethod(imageViewZoomConfigSaveMethod);
Step 3. Set Config
imageViewZoom.setConfig(imageViewZoomConfig);
Step 4. Use "saveImage()" method
imageViewZoom.saveImage(MainActivity.this, "ImageViewZoom", "test", Bitmap.CompressFormat.JPEG, 1, imageViewZoomConfig,new SaveFileListener() {
@Override
public void onSuccess(File file) {
Toast.makeText(MainActivity.this,"Success",Toast.LENGTH_SHORT).show();
}
@Override
public void onFail(Exception excepti) {
Toast.makeText(MainActivity.this,"Error Save",Toast.LENGTH_SHORT).show();
}
});