-1

I have a recyclerview that display images from firebase, and using PhotoView to provide Zoom-in-out

now i added a button to rotate images, but once the image is rotated the width would remain the same and when trying to zoom it won't zoom to full screen like before Rotation.

Height and width = "Match_parent"

now how to make that Recycler itemview would take full screen width after rotation? Please note iam not rotating the Device but the Image itself

code to rotate:

holder.rotateRight.setOnClickListener(view -> holder.image.animate().rotationBy(90f).setDuration(300).setInterpolator(new LinearInterpolator()).start());
MiniDev99
  • 324
  • 1
  • 13

1 Answers1

0

You may have to alter the LayoutParams for the ViewHolder, when the user rotates. I'm going to assume its currently width="match_parent" and height="wrap_content". By rotating the image to the right you have swapped what width/height mean. i.e., you're new width is wrap_content.

avalerio
  • 2,072
  • 1
  • 12
  • 11