PhotoPickerUiCustomizationParams.Builder
public
static
final
class
PhotoPickerUiCustomizationParams.Builder
extends Object
| java.lang.Object | |
| ↳ | android.widget.photopicker.PhotoPickerUiCustomizationParams.Builder |
A builder class used to construct and validate an immutable
PhotoPickerUiCustomizationParams object.
Summary
Public constructors | |
|---|---|
Builder()
|
|
Public methods | |
|---|---|
PhotoPickerUiCustomizationParams
|
build()
Builds a new immutable |
PhotoPickerUiCustomizationParams.Builder
|
setAspectRatio(int aspectRatio)
Sets the desired aspect ratio for the media grid thumbnails within the Photo Picker UI. |
Inherited methods | |
|---|---|
Public constructors
Public methods
build
public PhotoPickerUiCustomizationParams build ()
Builds a new immutable PhotoPickerUiCustomizationParams object.
| Returns | |
|---|---|
PhotoPickerUiCustomizationParams |
A new PhotoPickerUiCustomizationParams object with the configured UI
properties.
This value cannot be null. |
setAspectRatio
public PhotoPickerUiCustomizationParams.Builder setAspectRatio (int aspectRatio)
Sets the desired aspect ratio for the media grid thumbnails within the Photo Picker UI.
The value must be one of the following constants:
-
PhotoPickerUiCustomizationParams.ASPECT_RATIO_UNDEFINED -
PhotoPickerUiCustomizationParams.ASPECT_RATIO_SQUARE_1_1 -
PhotoPickerUiCustomizationParams.ASPECT_RATIO_PORTRAIT_9_16
IllegalArgumentException.
If not set, the PhotoPickerUiCustomizationParams.ASPECT_RATIO_UNDEFINED will be used.
| Parameters | |
|---|---|
aspectRatio |
int: The aspect ratio constant.
Value is one of the following: |
| Returns | |
|---|---|
PhotoPickerUiCustomizationParams.Builder |
This value cannot be null. |
| Throws | |
|---|---|
IllegalArgumentException |
if the provided aspectRatio is not one of the
supported constants (ERROR(/#VALID_ASPECT_RATIOS)). |