AccessibilityService.MagnificationController.SetScale(Single, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.