Builder


class Builder
kotlin.Any
   ↳ android.widget.photopicker.PhotoPickerUiCustomizationParams.Builder

A builder class used to construct and validate an immutable PhotoPickerUiCustomizationParams object.

Summary

Public constructors

Public methods
PhotoPickerUiCustomizationParams

Builds a new immutable PhotoPickerUiCustomizationParams object.

PhotoPickerUiCustomizationParams.Builder
setAspectRatio(aspectRatio: Int)

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

Public constructors

Builder

Builder()

Public methods

build

fun build(): PhotoPickerUiCustomizationParams

Builds a new immutable PhotoPickerUiCustomizationParams object.

Return
PhotoPickerUiCustomizationParams A new PhotoPickerUiCustomizationParams object with the configured UI properties.
This value cannot be null.

setAspectRatio

fun setAspectRatio(aspectRatio: Int): PhotoPickerUiCustomizationParams.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:

Any other value will result in throwing IllegalArgumentException.

If not set, the ASPECT_RATIO_UNDEFINED will be used.

Parameters
aspectRatio Int: The aspect ratio constant.
Value is one of the following:
Return
PhotoPickerUiCustomizationParams.Builder This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if the provided aspectRatio is not one of the supported constants (#VALID_ASPECT_RATIOS).