Builder
class Builder
| kotlin.Any | |
| ↳ | android.widget.photopicker.EmbeddedPhotoPickerUiCustomizationParams.Builder |
Builder class for EmbeddedPhotoPickerUiCustomizationParams.
Summary
| Public constructors | |
|---|---|
Builder() |
|
| Public methods | |
|---|---|
| EmbeddedPhotoPickerUiCustomizationParams |
build()Builds the |
| EmbeddedPhotoPickerUiCustomizationParams.Builder |
setAspectRatio(aspectRatio: Int)Sets the desired aspect ratio for the media grid thumbnails within the Photo Picker UI. |
| EmbeddedPhotoPickerUiCustomizationParams.Builder |
setSelectionBarVisibleInExpandedMode(visible: Boolean)Sets whether to show the Selection Bar in the embedded photopicker when in expanded mode. |
Public constructors
Public methods
build
fun build(): EmbeddedPhotoPickerUiCustomizationParams
Builds the EmbeddedPhotoPickerUiCustomizationParams object.
| Return | |
|---|---|
EmbeddedPhotoPickerUiCustomizationParams |
A new EmbeddedPhotoPickerUiCustomizationParams instance with the configured UI properties. This value cannot be null. |
setAspectRatio
fun setAspectRatio(aspectRatio: Int): EmbeddedPhotoPickerUiCustomizationParams.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 throwingIllegalArgumentException.
If not set, the ASPECT_RATIO_UNDEFINED will be used.
| Parameters | |
|---|---|
aspectRatio |
Int: The aspect ratio constant. Value is one of the following: |
| Return | |
|---|---|
EmbeddedPhotoPickerUiCustomizationParams.Builder |
This value cannot be null. |
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException |
if the provided aspectRatio is not one of the supported constants (#VALID_ASPECT_RATIOS). |
setSelectionBarVisibleInExpandedMode
fun setSelectionBarVisibleInExpandedMode(visible: Boolean): EmbeddedPhotoPickerUiCustomizationParams.Builder
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. |
| Return | |
|---|---|
EmbeddedPhotoPickerUiCustomizationParams.Builder |
This Builder object. This value cannot be null. |