Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to save and restore value of an image? #237

Open
andysagar opened this issue Jun 27, 2024 · 0 comments
Open

How to save and restore value of an image? #237

andysagar opened this issue Jun 27, 2024 · 0 comments

Comments

@andysagar
Copy link

andysagar commented Jun 27, 2024

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() + " :::");
@andysagar andysagar changed the title How to save and restore value of image? How to save and restore value of an image? Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant