alexvasilkov / GestureViews

ImageView and FrameLayout with gestures control and position animation
Apache License 2.0
2.38k stars 384 forks source link

Avoid lost zoom on configuration changed #120

Closed truXton222 closed 4 years ago

truXton222 commented 6 years ago

hi, when i change from port to landscape the current zoom level is lost.

Any way to keep the zoom level?

tnx

Farasy commented 6 years ago

Simply reapply the state.

image.getController().getState() image.getController().getState().set(...)

or just reapply the zoom level

image.getController().getState().zoomTo(...)