AccessibilityService.MagnificationController.SetScale(Single, Boolean) Method

Definition

Sets the magnification scale.

[Android.Runtime.Register("setScale", "(FZ)Z", "", ApiSince=24)]
public bool SetScale (float scale, bool animate);
[<Android.Runtime.Register("setScale", "(FZ)Z", "", ApiSince=24)>]
member this.SetScale : single * bool -> bool

Parameters

scale
Single

the magnification scale to set, must be >= 1 and <= 8

animate
Boolean

true to animate from the current scale or false to set the scale immediately

Returns

true on success, false on failure

Attributes

Remarks

Sets the magnification scale.

<strong>Note:</strong> If the service is not yet connected (e.g. AccessibilityService#onServiceConnected() has not yet been called) or the service has been disconnected, this method will have no effect and return false.

<strong>Note:</strong> This legacy API sets the scale of full-screen magnification. To set the scale of the specified magnifier, use #setMagnificationConfig instead.

This member is deprecated. Use #setMagnificationConfig(MagnificationConfig, boolean) instead

Java documentation for android.accessibilityservice.AccessibilityService.MagnificationController.setScale(float, boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to