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

# BatchUpdates.Builder

*** ** * ** ***

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

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.service.autofill.BatchUpdates.Builder |

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/android/service/autofill/BatchUpdates` objects.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder#Builder()() ` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/service/autofill/BatchUpdates` | ` https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder#build()() ` Creates a new `https://developer.android.com/reference/android/service/autofill/BatchUpdates` instance. |
| ` https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder` | ` https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder#transformChild(int,%20android.service.autofill.Transformation)(int id, https://developer.android.com/reference/android/service/autofill/Transformation transformation) ` Adds a transformation to replace the value of a child view with the fields in the screen. |
| ` https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder` | ` https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder#updateTemplate(android.widget.RemoteViews)(https://developer.android.com/reference/android/widget/RemoteViews updates) ` Applies the `updates` in the underlying presentation template. |

### 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

```
public Builder ()
```

<br />

<br />

## Public methods

### build

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

```
public BatchUpdates build ()
```

Creates a new `https://developer.android.com/reference/android/service/autofill/BatchUpdates` instance.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/service/autofill/BatchUpdates` | <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if `https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder#build()` was already called before or no call to `https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder#updateTemplate(android.widget.RemoteViews)` or `https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder#transformChild(int,%20android.service.autofill.Transformation)` has been made. |

### transformChild

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

```
public BatchUpdates.Builder transformChild (int id, 
                Transformation transformation)
```

Adds a transformation to replace the value of a child view with the fields in the screen.

When multiple transformations are added for the same child view, they are applied in the same order as added.

**Note:** The transformations are applied after the `https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder#updateTemplate(android.widget.RemoteViews)` are applied to the presentation template.

<br />

| Parameters ||
|---|---|
| `id` | `int`: view id of the children view. <br /> |
| `transformation` | `Transformation`: an implementation provided by the Android System. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder` | this builder. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `transformation` is not a class provided by the Android System. |

### updateTemplate

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

```
public BatchUpdates.Builder updateTemplate (RemoteViews updates)
```

Applies the `updates` in the underlying presentation template.

**Note:** The updates are applied before the `https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder#transformChild(int,%20android.service.autofill.Transformation)` are applied to the children views.

Theme does not work with RemoteViews layout. Avoid hardcoded text color or background color: Autofill on different platforms may have different themes.

<br />

| Parameters ||
|---|---|
| `updates` | `RemoteViews`: a `https://developer.android.com/reference/android/widget/RemoteViews` with the updated actions to be applied in the underlying presentation template. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/service/autofill/BatchUpdates.Builder` | this builder <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `condition` is not a class provided by the Android System. |