method @NonNull public android.widget.Magnifier.Builder setCornerRadius(@Px @FloatRange(from=0) float);
method @NonNull public android.widget.Magnifier.Builder setDefaultSourceToMagnifierOffset(@Px int, @Px int);
method @NonNull public android.widget.Magnifier.Builder setElevation(@Px @FloatRange(from=0) float);
+ method @NonNull public android.widget.Magnifier.Builder setInitialZoom(@FloatRange(from=0.0f) float);
method @NonNull public android.widget.Magnifier.Builder setOverlay(@Nullable android.graphics.drawable.Drawable);
method @NonNull public android.widget.Magnifier.Builder setSize(@Px @IntRange(from=0) int, @Px @IntRange(from=0) int);
method @NonNull public android.widget.Magnifier.Builder setSourceBounds(int, int, int, int);
- method @NonNull public android.widget.Magnifier.Builder setZoom(@FloatRange(from=0.0f) float);
}
public class MediaController extends android.widget.FrameLayout {
/**
* @return the initial width of the content magnified and copied to the magnifier, in pixels
* @see Magnifier.Builder#setSize(int, int)
- * @see Magnifier.Builder#setZoom(float)
+ * @see Magnifier.Builder#setInitialZoom(float)
*/
@Px
public int getSourceWidth() {
/**
* @return the initial height of the content magnified and copied to the magnifier, in pixels
* @see Magnifier.Builder#setSize(int, int)
- * @see Magnifier.Builder#setZoom(float)
+ * @see Magnifier.Builder#setInitialZoom(float)
*/
@Px
public int getSourceHeight() {
* If the zoom is x and the magnifier window size is (width, height), the original size
* of the content being magnified will be (width / x, height / x).
* @return the zoom applied to the content
- * @see Magnifier.Builder#setZoom(float)
+ * @see Magnifier.Builder#setInitialZoom(float)
*/
public float getZoom() {
return mZoom;
* (content_width * zoom, content_height * zoom), which will coincide with the size
* of the magnifier. A zoom of 1 will translate to no magnification (the content will
* be just copied to the magnifier with no scaling). The zoom defaults to 1.25.
+ * Note that the zoom can also be changed after the instance is built, using the
+ * {@link Magnifier#setZoom(float)} method.
* @param zoom the zoom to be set
*/
@NonNull
- public Builder setZoom(@FloatRange(from = 0f) float zoom) {
+ public Builder setInitialZoom(@FloatRange(from = 0f) float zoom) {
Preconditions.checkArgumentPositive(zoom, "Zoom should be positive");
mZoom = zoom;
return this;