Added in [API level 37.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 23](https://developer.android.com/sdkExtensions)

# Builder

*** ** * ** ***

```
class Builder
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.widget.photopicker.EmbeddedPhotoPickerUiCustomizationParams.Builder](https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams.Builder#) |

Builder class for `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams`.

## Summary

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams.Builder#Builder()()` <br /> |

| Public methods ||
|---|---|
| [EmbeddedPhotoPickerUiCustomizationParams](https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams) | `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams.Builder#build()()` Builds the `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams` object. |
| [EmbeddedPhotoPickerUiCustomizationParams.Builder](https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams.Builder#) | `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams.Builder#setAspectRatio(kotlin.Int)(aspectRatio: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Sets the desired aspect ratio for the media grid thumbnails within the Photo Picker UI. |
| [EmbeddedPhotoPickerUiCustomizationParams.Builder](https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams.Builder#) | `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams.Builder#setSelectionBarVisibleInExpandedMode(kotlin.Boolean)(visible: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` Sets whether to show the Selection Bar in the embedded photopicker when in expanded mode. |

## Public constructors

### Builder

Added in [API level 37.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 23](https://developer.android.com/sdkExtensions)

```
Builder()
```

## Public methods

### build

Added in [API level 37.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 23](https://developer.android.com/sdkExtensions)

```
fun build(): EmbeddedPhotoPickerUiCustomizationParams
```

Builds the `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams` object.

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams` | A new `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams` instance with the configured UI properties. This value cannot be `null`. |

### setAspectRatio

Added in [API level 37.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 23](https://developer.android.com/sdkExtensions)

```
fun setAspectRatio(aspectRatio: Int): EmbeddedPhotoPickerUiCustomizationParams.Builder
```

Sets the desired aspect ratio for the media grid thumbnails within the Photo Picker UI.

The value must be one of the following constants:

- `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams#ASPECT_RATIO_UNDEFINED:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams#ASPECT_RATIO_SQUARE_1_1:kotlin.Int`
- `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams#ASPECT_RATIO_PORTRAIT_9_16:kotlin.Int`

Any other value will result in throwing `IllegalArgumentException`.

If not set, the `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams#ASPECT_RATIO_UNDEFINED:kotlin.Int` will be used.

| Parameters ||
|---|---|
| `aspectRatio` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The aspect ratio constant. Value is one of the following: - `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams#ASPECT_RATIO_UNDEFINED:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams#ASPECT_RATIO_SQUARE_1_1:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams#ASPECT_RATIO_PORTRAIT_9_16:kotlin.Int` |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams.Builder#` | This value cannot be `null`. |

| Exceptions ||
|---|---|
| `java.lang.IllegalArgumentException` | if the provided `aspectRatio` is not one of the supported constants (#VALID_ASPECT_RATIOS). |

### setSelectionBarVisibleInExpandedMode

Added in [API level 37.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 23](https://developer.android.com/sdkExtensions)

```
fun setSelectionBarVisibleInExpandedMode(visible: Boolean): EmbeddedPhotoPickerUiCustomizationParams.Builder
```

Sets whether to show the Selection Bar in the embedded photopicker when in expanded mode. By default, the Selection Bar is shown.

| Parameters ||
|---|---|
| `visible` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): `false` to hide the Selection Bar, `true` to show it. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/widget/photopicker/EmbeddedPhotoPickerUiCustomizationParams.Builder#` | This Builder object. This value cannot be `null`. |