EmbeddedPhotoPickerUiCustomizationParams


public final class EmbeddedPhotoPickerUiCustomizationParams
extends Object implements Parcelable

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


Defines UI customization options specific to the embedded Photo Picker interface.

This immutable class allows an application to specify visual preferences to optimize the user experience within the picker.

Summary

Nested classes

class EmbeddedPhotoPickerUiCustomizationParams.Builder

Builder class for EmbeddedPhotoPickerUiCustomizationParams

Constants

int ASPECT_RATIO_PORTRAIT_9_16

Aspect ratio option requesting portrait 9:16 sizing for the thumbnails within the media grid.

int ASPECT_RATIO_SQUARE_1_1

Aspect ratio option requesting square 1:1 thumbnail sizing within the media grid.

int ASPECT_RATIO_UNDEFINED

Aspect ratio option sent to photo picker when no aspect ratio is set by the calling app.

Inherited constants

Fields

public static final Creator<EmbeddedPhotoPickerUiCustomizationParams> CREATOR

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

int getAspectRatio()

Returns the constant representing the aspect ratio currently configured for thumbnail sizing within the Photo Picker's media grid.

boolean isSelectionBarVisibleInExpandedMode()

Returns whether the Selection Bar should be visible in expanded mode in Embedded picker as set by the calling application.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

ASPECT_RATIO_PORTRAIT_9_16

Added in version 37.1
Also in U Extensions 23
public static final int ASPECT_RATIO_PORTRAIT_9_16

Aspect ratio option requesting portrait 9:16 sizing for the thumbnails within the media grid.

Constant Value: 1 (0x00000001)

ASPECT_RATIO_SQUARE_1_1

Added in version 37.1
Also in U Extensions 23
public static final int ASPECT_RATIO_SQUARE_1_1

Aspect ratio option requesting square 1:1 thumbnail sizing within the media grid.

Constant Value: 0 (0x00000000)

ASPECT_RATIO_UNDEFINED

Added in version 37.1
Also in U Extensions 23
public static final int ASPECT_RATIO_UNDEFINED

Aspect ratio option sent to photo picker when no aspect ratio is set by the calling app.

Constant Value: -1 (0xffffffff)

Fields

CREATOR

Added in version 37.1
Also in U Extensions 23
public static final Creator<EmbeddedPhotoPickerUiCustomizationParams> CREATOR

Public methods

describeContents

Added in version 37.1
public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

getAspectRatio

Added in version 37.1
Also in U Extensions 23
public int getAspectRatio ()

Returns the constant representing the aspect ratio currently configured for thumbnail sizing within the Photo Picker's media grid. (e.g., ASPECT_RATIO_SQUARE_1_1).

If the aspect ratio is not set by the caller app using Builder.setAspectRatio(int), this method returns ASPECT_RATIO_UNDEFINED, indicating that the photo picker will use its default 1:1 media grid aspect ratio.

Returns
int Value is one of the following:

isSelectionBarVisibleInExpandedMode

Added in version 37.1
Also in U Extensions 23
public boolean isSelectionBarVisibleInExpandedMode ()

Returns whether the Selection Bar should be visible in expanded mode in Embedded picker as set by the calling application.

If not set by the caller using Builder.setSelectionBarVisibleInExpandedMode(boolean), this method returns true by default.

Returns
boolean true if the selection bar should be visible, false otherwise.

writeToParcel

Added in version 37.1
public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following: