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.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
Public methods
build
public EmbeddedPhotoPickerUiCustomizationParams build ()
Builds the EmbeddedPhotoPickerUiCustomizationParams object.
| Returns | |
|---|---|
EmbeddedPhotoPickerUiCustomizationParams |
A new EmbeddedPhotoPickerUiCustomizationParams instance with the
configured UI properties.
This value cannot be null. |
setAspectRatio
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:
-
EmbeddedPhotoPickerUiCustomizationParams.ASPECT_RATIO_UNDEFINED -
EmbeddedPhotoPickerUiCustomizationParams.ASPECT_RATIO_SQUARE_1_1 -
EmbeddedPhotoPickerUiCustomizationParams.ASPECT_RATIO_PORTRAIT_9_16
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
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. |