-
Notifications
You must be signed in to change notification settings - Fork 386
Settings
You can get Settings
with gestureView.getController().getSettings()
.
Max zoom level.
Default is 2f.
Double tap zoom level, should not be greater than max zoom level.
Default is -1f, means max zoom level will be used as double tap level.
Whether panning is enabled or not.
Default is true.
Whether zooming is enabled or not.
Default is true.
Whether zooming by double tap is enabled or not.
Default is true.
Whether rotation gesture is enabled or not.
Default is false.
Whether image rotation should stick to 90 degrees intervals or can be free.
Only applied if isRestrictBounds()
is true.
Default is false.
Overscroll distance in pixels. User will be able to "over scroll" up to this distance. Cannot be < 0.
Default is to no overscroll (0f, 0f).
Overzoom factor. User will be able to "over zoom" up to this factor. Cannot be < 1.
Default is 2f.
If set to true
small image will be scaled to fit entire viewport (or entire movement area if it was set) even if this will require zoom level above max zoom level.
Default is false.
Setting image fitting method within viewport area. Available values:
-
Fit.HORIZONTAL
Fit image width inside viewport area -
Fit.VERTICAL
Fit image height inside viewport area -
Fit.INSIDE
Fit both image width and image height inside viewport area -
Fit.OUTSIDE
Fit image width or image height inside viewport area, so the entire viewport is filled up
Default is Fit.INSIDE.
Image gravity inside viewport area. Available values are:
- Gravity.CENTER
- Gravity.CENTER_VERTICAL
- Gravity.CENTER_HORIZONTAL
- Gravity.TOP
- Gravity.BOTTOM
- Gravity.LEFT
- Gravity.RIGHT
- Gravity.START
- Gravity.END
- Any combinations of above
Default is Gravity.CENTER
Disable all gestures.
Calls to this method are counted, so if you called it N times you should call enableGestures()
N times to re-enable all gestures.
Useful when you need temporary disable touch gestures during animation or image loading.
Re-enable all gestures disabled by disableGestures()
method.
Movement area size.
Viewport area will be used instead if no movement area is specified.
Whether image transformations should be kept in bounds or not.
Can be set to false during animation to make it smoother, but you should ensure end state of animation is within bounds.
Default value is true.
Viewport size. Should only be used when implementing custom GestureView
.
Full image size. Should only be used when implementing custom GestureView
.