<div class='sourceset sourceset-android'>Android</div>

```kotlin
class Builder
```

Builder class for `RemoteCollectionItems` objects.

## Functions

<h2 id="additem-id-view">addItem</h2>

```kotlin
@SuppressLint("MissingGetterMatchingBuilder")
        fun addItem(id: Long, view: RemoteViews): Builder
```

Adds a `RemoteViews` to the collection.

#### Parameters

| | |
| --- | --- |
| id | Id to associate with the row. Use [.setHasStableIds] to indicate that ids are stable across changes to the collection. |
| view | RemoteViews to display for the row. |

<hr class="docs-overload-divider">

<h2 id="sethasstableids-hasstableids">setHasStableIds</h2>

```kotlin
fun setHasStableIds(hasStableIds: Boolean): Builder
```

Sets whether the item ids are stable across changes to the underlying data.

<hr class="docs-overload-divider">

<h2 id="setviewtypecount-viewtypecount">setViewTypeCount</h2>

```kotlin
fun setViewTypeCount(viewTypeCount: Int): Builder
```

Sets the view type count for the collection when used in an adapter. This can be set to
the maximum number of different layout ids that will be used by RemoteViews in this
collection.

If this value is not set, then a value will be inferred from the provided items. As a
result, the adapter may need to be recreated when the list is updated with previously
unseen RemoteViews layouts for new items.

<hr class="docs-overload-divider">

<h2 id="build">build</h2>

```kotlin
fun build(): RemoteCollectionItems
```

Creates the `RemoteCollectionItems` defined by this builder.