Added in API level 33

Builder


class Builder
kotlin.Any
   ↳ android.accessibilityservice.MagnificationConfig.Builder

Builder for creating MagnificationConfig objects.

Summary

Public constructors

Creates a new Builder.

Public methods
MagnificationConfig

Builds and returns a MagnificationConfig

MagnificationConfig.Builder
setActivated(activated: Boolean)

Sets magnification activated state.

MagnificationConfig.Builder
setCenterX(centerX: Float)

Sets the X coordinate of the center of the magnification viewport.

MagnificationConfig.Builder
setCenterY(centerY: Float)

Sets the Y coordinate of the center of the magnification viewport.

MagnificationConfig.Builder
setMode(mode: Int)

Sets the magnification mode.

MagnificationConfig.Builder
setScale(scale: Float)

Sets the magnification scale.

Public constructors

Builder

Added in API level 33
Builder()

Creates a new Builder.

Public methods

build

Added in API level 33
fun build(): MagnificationConfig

Builds and returns a MagnificationConfig

Return
MagnificationConfig This value cannot be null.

setActivated

Added in API level 34
fun setActivated(activated: Boolean): MagnificationConfig.Builder

Sets magnification activated state.

Parameters
activated Boolean: The magnification activated state
Return
MagnificationConfig.Builder This builder This value cannot be null.

setCenterX

Added in API level 33
fun setCenterX(centerX: Float): MagnificationConfig.Builder

Sets the X coordinate of the center of the magnification viewport. The controlling magnifier will apply the given position.

Parameters
centerX Float: the screen-relative X coordinate around which to center and scale that is in the range [0, screenWidth], or Float#NaN to leave unchanged
Return
MagnificationConfig.Builder This builder This value cannot be null.

setCenterY

Added in API level 33
fun setCenterY(centerY: Float): MagnificationConfig.Builder

Sets the Y coordinate of the center of the magnification viewport. The controlling magnifier will apply the given position.

Parameters
centerY Float: the screen-relative Y coordinate around which to center and scale that is in the range [0, screenHeight], or Float#NaN to leave unchanged
Return
MagnificationConfig.Builder This builder This value cannot be null.

setScale

Added in API level 33
fun setScale(scale: Float): MagnificationConfig.Builder

Sets the magnification scale.

Parameters
scale Float: The magnification scale, in the range [1, 8] Value is between 1f and 8f inclusive
Return
MagnificationConfig.Builder This builder This value cannot be null.