Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder#inhmethods)

# MagnificationConfig.Builder

*** ** * ** ***

` public static final class MagnificationConfig.Builder `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.accessibilityservice.MagnificationConfig.Builder |

<br />

*** ** * ** ***

Builder for creating `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig` objects.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder#Builder()() ` Creates a new Builder. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig` | ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder#build()() ` Builds and returns a `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig` |
| ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder` | ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder#setActivated(boolean)(boolean activated) ` Sets magnification activated state. |
| ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder` | ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder#setCenterX(float)(float centerX) ` Sets the X coordinate of the center of the magnification viewport. |
| ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder` | ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder#setCenterY(float)(float centerY) ` Sets the Y coordinate of the center of the magnification viewport. |
| ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder` | ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder#setMode(int)(int mode) ` Sets the magnification mode. |
| ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder` | ` https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder#setScale(float)(float scale) ` Sets the magnification scale. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### Builder

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder ()
```

Creates a new Builder.

<br />

## Public methods

### build

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MagnificationConfig build ()
```

Builds and returns a `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig`

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig` | This value cannot be `null`. <br /> |

### setActivated

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MagnificationConfig.Builder setActivated (boolean activated)
```

Sets magnification activated state.

<br />

| Parameters ||
|---|---|
| `activated` | `boolean`: The magnification activated state <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder` | This builder. This value cannot be `null`. <br /> |

### setCenterX

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MagnificationConfig.Builder setCenterX (float centerX)
```

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

<br />

| Parameters ||
|---|---|
| `centerX` | `float`: the screen-relative X coordinate around which to center and scale that is in the range \[0, screenWidth\], or `https://developer.android.com/reference/java/lang/Float#NaN` to leave unchanged <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder` | This builder. This value cannot be `null`. <br /> |

### setCenterY

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MagnificationConfig.Builder setCenterY (float centerY)
```

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

<br />

| Parameters ||
|---|---|
| `centerY` | `float`: the screen-relative Y coordinate around which to center and scale that is in the range \[0, screenHeight\], or `https://developer.android.com/reference/java/lang/Float#NaN` to leave unchanged <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder` | This builder. This value cannot be `null`. <br /> |

### setMode

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MagnificationConfig.Builder setMode (int mode)
```

Sets the magnification mode.

<br />

| Parameters ||
|---|---|
| `mode` | `int`: The magnification mode. Value is one of the following: - `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig#MAGNIFICATION_MODE_DEFAULT` - `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig#MAGNIFICATION_MODE_FULLSCREEN` - `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig#MAGNIFICATION_MODE_WINDOW` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder` | This builder. This value cannot be `null`. <br /> |

### setScale

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MagnificationConfig.Builder setScale (float scale)
```

Sets the magnification scale.

<br />

| Parameters ||
|---|---|
| `scale` | `float`: The magnification scale, in the range \[1, 8\]. Value is between 1.0f and 8.0f inclusive <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/accessibilityservice/MagnificationConfig.Builder` | This builder. This value cannot be `null`. <br /> |