You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the ZoomLayout to display a document. Sometimes this document needs to be rotated because the source document orientation is wrong on the back end. I therefore use the View Rotation property on my FrameLayout container. However, ZoomLayout doesn't account for this when setting it's content size and the zoom/scrolling is therefore off.
I have noticed that ZoomLayout uses the Width and Height on the content directly in it's GlobalLayoutListener. The View's transformation matrix should also be used to get the visible bounds of the content.
The text was updated successfully, but these errors were encountered:
Yeah, we also don't account for other draw properties like scaleX, scaleY, pivotX, pivotY... But no ViewGroup does this with its children. A better path for this project is to implement rotation inside ZoomEngine, so instead of calling view.setRotation(), you call engine.setRotation(). But that's a long term milestone for now.
Meanwhile I think you should be able to overcome this by wrapping your rotated view inside another layout, and override this layout's onMeasure()
I overcame this limit by having a container view that is sized according to the rotated document but without any Rotation applied on it, and it’s content uses Rotation and TranslationX/Y to position itself properly.
I'm using the ZoomLayout to display a document. Sometimes this document needs to be rotated because the source document orientation is wrong on the back end. I therefore use the View
Rotation
property on my FrameLayout container. However, ZoomLayout doesn't account for this when setting it's content size and the zoom/scrolling is therefore off.I have noticed that ZoomLayout uses the Width and Height on the content directly in it's GlobalLayoutListener. The View's transformation matrix should also be used to get the visible bounds of the content.
The text was updated successfully, but these errors were encountered: