# UiCustomizationParams

Artifact: [androidx.photopicker:photopicker-activity](https://developer.android.com/jetpack/androidx/releases/photopicker) [View Source](https://cs.android.com/search?q=file:androidx/photopicker/activity/params/UiCustomizationParams.kt+class:androidx.photopicker.activity.params.UiCustomizationParams) Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/photopicker#1.0.0-alpha03)

*** ** * ** ***


```
public final class UiCustomizationParams
```

<br />

*** ** * ** ***

Defines UI customization options for the photopicker.

| See also |
|---|---|
| `https://developer.android.com/reference/android/provider/MediaStore.html#EXTRA_PICK_IMAGES_UI_CUSTOMIZATION_PARAMS` |   |
| `https://developer.android.com/reference/android/widget/photopicker/PhotoPickerUiCustomizationParams.html` |   |

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/photopicker/activity/params/UiCustomizationParams.Builder` A builder for constructing `https://developer.android.com/reference/androidx/photopicker/activity/params/UiCustomizationParams` instance. |

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/photopicker/activity/params/UiCustomizationParams#ASPECT_RATIO_PORTRAIT_9_16() = 1` Requests a portrait 9:16 aspect ratio for the photopicker thumbnail sizing within the media grid. |
| `static final int` | `https://developer.android.com/reference/androidx/photopicker/activity/params/UiCustomizationParams#ASPECT_RATIO_SQUARE_1_1() = 0` Request the default square 1:1 ratio for the photopicker thumbnail sizing within the media grid. |
| `static final int` | `https://developer.android.com/reference/androidx/photopicker/activity/params/UiCustomizationParams#ASPECT_RATIO_UNDEFINED()` Undefined aspect ratio for the photopicker thumbnail sizing within the media grid. |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/photopicker/activity/params/UiCustomizationParams#getAspectRatio()()` The set `https://developer.android.com/reference/androidx/photopicker/activity/params/UiCustomizationParams.Companion.AspectRatio` for this request, defaulting to `https://developer.android.com/reference/androidx/photopicker/activity/params/UiCustomizationParams#ASPECT_RATIO_UNDEFINED()`. |

## Constants

### ASPECT_RATIO_PORTRAIT_9_16

```
public static final int ASPECT_RATIO_PORTRAIT_9_16 = 1
```

Requests a portrait 9:16 aspect ratio for the photopicker thumbnail sizing within the media grid.

| See also |
|---|---|
| `https://developer.android.com/reference/android/widget/photopicker/PhotoPickerUiCustomizationParams.html#ASPECT_RATIO_PORTRAIT_9_16` |   |

### ASPECT_RATIO_SQUARE_1_1

```
public static final int ASPECT_RATIO_SQUARE_1_1 = 0
```

Request the default square 1:1 ratio for the photopicker thumbnail sizing within the media grid.

| See also |
|---|---|
| `https://developer.android.com/reference/android/widget/photopicker/PhotoPickerUiCustomizationParams.html#ASPECT_RATIO_SQUARE_1_1` |   |

### ASPECT_RATIO_UNDEFINED

```
public static final int ASPECT_RATIO_UNDEFINED
```

Undefined aspect ratio for the photopicker thumbnail sizing within the media grid.

## Public methods

### getAspectRatio

Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/photopicker#1.0.0-alpha03)

```
public final int getAspectRatio()
```

The set `https://developer.android.com/reference/androidx/photopicker/activity/params/UiCustomizationParams.Companion.AspectRatio` for this request, defaulting to `https://developer.android.com/reference/androidx/photopicker/activity/params/UiCustomizationParams#ASPECT_RATIO_UNDEFINED()`.

Value is one of the following:

- `-1`
- `0`
- `1`

<br />