

If true, the content will be allowed to zoom in and out by user input. Moves the zoom to the given value, animating if needed.Īpplies the given factor to the current zoom, animating if needed. Moves the real zoom to the given value, animating if needed. Sets an OverPanRangeProvider that defines the allowed amount to pan outside the content’s bounds. If true, the content will be allowed to vertically pan outside its bounds, then return to its position. If true, the content will be allowed to horizontally pan outside its bounds, then return to its position. Sets an OverZoomRangeProvider that defines the allowed amount to zoom outside the content’s bounds. If true, the content will be allowed to zoom outside its bounds, then return to its position. Returns the current zoom taking into account the base scale. Returns the current zoom, not taking into account the base scale.

#RIGHT ZOOM PDF#
g., in a PDF viewer, you might want to cap real zoom at 1. Depending on the context, imposing restrictions on one type To define the zoom type you are referencing to. Some of the zoom APIs will let you pass an integer (either TYPE_ZOOM or TYPE_REAL_ZOOM)

Note that these values will change if the setContentSize or setContainerSize APIs are used The distinction is very useful when it comes to imposing min and max constraints to our zoom value. To make things clearer, when transformation is none, the zoom and the real zoom will be identical. realZoom = 1 means that the 1 inch of the content fits 1 inch of the screen. The actual scale value, including the initial transformation. zoom = 1 means that the content was untouched after the transformation. The scale value after the initial transformation. Since we have silently appliedĪ base zoom to the content, we must introduce two separate types: Zoom type The base transformation makes the difference between zoom and realZoom. NONE ) // Remove any forced alignment Zoom Types TOP ) // Equals to Aligment.TOP or Alignment.NONE_HORIZONTAL engine. You can use the or operation to mix the vertical and horizontal flags:Įngine.
#RIGHT ZOOM FREE#
No alignment set: content is free to be moved on that axis. Alignmentįorce align the content to the same side of the container.įorce the content to be centered inside the container on that axis. left) would mean making part of the content unreachable (e.g. Note: alignment does not make sense when content is larger than the container, because forcing anĪlignment (e.g. The default value is Alignment.CENTER which will center the content on both directions. Or the alignment XML flag of ZoomLayout and ZoomImageView. You can force the content position with respect to the container using the setAlignment(int) method This means thatĪ centerCrop transformation will not have the desired effect: it will act just like a centerInside. This means that the final position might be slightly (or completely) different.įor example, when maxZoom = 1, the content is forced to not be any larger than the container. Note: after transformation and gravity are applied, the engine will apply - as always - all the active constraints, The transformation gravity is taken from the engine alignment, defaults to center on both axes. The content is panned so that its top side matches teh container top side.
#RIGHT ZOOM PLUS#
Supported values are most of the flags like Gravity.TOP, plus TRANSFORMATION_GRAVITY_AUTO. The larger side will be cropped.Īfter transformation is applied, the transformation gravity will reposition the content with The content is scaled down or up so that its smaller side fits exactly inside the view bounds. The content is scaled down or up so that it fits completely inside the view bounds. Which can be controlled through setTransformation(int, int) or app:transformation and app:transformationGravity. a transformationGravity value (modifies pan in a certain way).a transformation value (modifies zoom in a certain way).It is a keyframe that is reached atĬertain points, like at start-up or when explicitly requested through setContentSize or setContainerSize. The transformation defines the engine resting position. These are common to all Zoom classes in the library,Īnd also to the low level engine. This page describes all the APIs related to zoom.
