question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bounds not adjusted when rotating device

See original GitHub issue

Dear Alex, rotating the device will not re-adjust a photo to fit the screen. Instead you have to zoom out to make it fit.

image.getController().getSettings().setFillViewport(true); image.getController().getSettings().setOverzoomFactor(10f); image.getController().getSettings().setDoubleTapZoom(2f); image.getController().getSettings().setMaxZoom(20f); image.getController().getSettings().setFitMethod(Fit.INSIDE);

Manifest android:configChanges="orientation|keyboardHidden|screenSize|locale"

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexvasilkovcommented, May 5, 2018

Fixed in v2.5.2

1reaction
alexvasilkovcommented, Apr 23, 2018

Not sure what behaviour changes you are referring to, there were no changes related to state reset.

I reproduced your issue myself, the easiest fix for me was:

image.getViewTreeObserver().addOnGlobalLayoutListener(() -> image.getController().resetState());

I will think about fixing it within the library in next versions, will need to consider implications first.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS bounds change after rotating to landscape, then back to ...
When the system sends you willRotateToInterfaceOrientation:duration: , it has not updated your view's frame to its new size.
Read more >
Resize UICollectionViewCells On Rotation In Swift
This happens because the incorrect bounds are used to compute new cell sizes after rotation. To properly support rotation, the new bounds after ......
Read more >
View bounds and touchable area incorrect after a rotate or a ...
The bounds are not correctly transformed. The touch area is not correctly transformed and press behaviour is broken where the real view and...
Read more >
Adjust rotation and canvas size in Photoshop - Adobe Support
This document outlines the different methods you can use to adjust your image's cropping, rotation, and canvas size.
Read more >
Limit Box | ReCap - Autodesk Knowledge Network
To rotate the Limit Box, move the cursor so that an edge is highlighted and hold down the Ctrl key. Next, click and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found