EmbeddedPhotoPickerUiCustomizationParams.Builder


public static final class EmbeddedPhotoPickerUiCustomizationParams.Builder
extends Object

java.lang.Object
   ↳ android.widget.photopicker.EmbeddedPhotoPickerUiCustomizationParams.Builder


Builder class for EmbeddedPhotoPickerUiCustomizationParams.

Summary

Public constructors

Builder()

Public methods

EmbeddedPhotoPickerUiCustomizationParams build()

Builds the EmbeddedPhotoPickerUiCustomizationParams object.

EmbeddedPhotoPickerUiCustomizationParams.Builder setAspectRatio(int aspectRatio)

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

EmbeddedPhotoPickerUiCustomizationParams.Builder setSelectionBarVisibleInExpandedMode(boolean visible)

Sets whether to show the Selection Bar in the embedded photopicker when in expanded mode.

Inherited methods

Public constructors

Builder

Added in version 37.1
Also in U Extensions 23
public Builder ()

Public methods

build

Added in version 37.1
Also in U Extensions 23
public EmbeddedPhotoPickerUiCustomizationParams build ()

Builds the EmbeddedPhotoPickerUiCustomizationParams object.

Returns
EmbeddedPhotoPickerUiCustomizationParams A new EmbeddedPhotoPickerUiCustomizationParams instance with the configured UI properties.
This value cannot be null.

setAspectRatio

Added in version 37.1
Also in U Extensions 23
public EmbeddedPhotoPickerUiCustomizationParams.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:

Any other value will result in throwing IllegalArgumentException.

If not set, the EmbeddedPhotoPickerUiCustomizationParams.ASPECT_RATIO_UNDEFINED will be used.

Parameters
aspectRatio int: The aspect ratio constant.
Value is one of the following:
Returns
EmbeddedPhotoPickerUiCustomizationParams.Builder This value cannot be null.

Throws
IllegalArgumentException if the provided aspectRatio is not one of the supported constants (ERROR(/#VALID_ASPECT_RATIOS)).

setSelectionBarVisibleInExpandedMode

Added in version 37.1
Also in U Extensions 23
public EmbeddedPhotoPickerUiCustomizationParams.Builder setSelectionBarVisibleInExpandedMode (boolean visible)

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: false to hide the Selection Bar, true to show it.

Returns
EmbeddedPhotoPickerUiCustomizationParams.Builder This Builder object.
This value cannot be null.