ZoomLayout
ZoomLayout copied to clipboard
How to save and restore value of an image?
How to save and restore value of an image from one activity to another?
<com.otaliastudios.zoom.ZoomImageView
android:id="@+id/user_photo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:nestedScrollingEnabled="true"
app:transformation="centerCrop" />
i tried using
binding.userPhoto.getEngine().getMatrix()
but it does not seem to work for me. I also logged everything, but I was wondering if there is any method for this?
Log.e("getMatrix", binding.userPhoto.getEngine().getMatrix() + " :::");
Log.e("getPanX", binding.userPhoto.getEngine().getPanX() + " :::");
Log.e("getPanY", binding.userPhoto.getEngine().getPanY() + " :::");
Log.e("getZoom", binding.userPhoto.getEngine().getZoom() + " :::");
Log.e("getScaledPan", binding.userPhoto.getEngine().getScaledPan() + " :::");
Log.e("getScaledPanX", binding.userPhoto.getEngine().getScaledPanX() + " :::");
Log.e("getScaledPanY", binding.userPhoto.getEngine().getScaledPanY() + " :::");