EmbeddedPhotoPickerFeatureInfo.Builder
public
static
final
class
EmbeddedPhotoPickerFeatureInfo.Builder
extends Object
java.lang.Object | |
↳ | android.widget.photopicker.EmbeddedPhotoPickerFeatureInfo.Builder |
Summary
Public constructors | |
---|---|
Builder()
|
Public methods | |
---|---|
EmbeddedPhotoPickerFeatureInfo
|
build()
Build the class for desired feature info arguments |
EmbeddedPhotoPickerFeatureInfo.Builder
|
setAccentColor(long accentColor)
Sets accent color which will change color of primary picker elements like Done button, selected media icon colors, tab color etc. |
EmbeddedPhotoPickerFeatureInfo.Builder
|
setMaxSelectionLimit(int maxSelectionLimit)
Sets maximum number of items that can be selected by the user The value of this intent-extra should be a positive integer greater than
or equal to 1 and less than or equal to |
EmbeddedPhotoPickerFeatureInfo.Builder
|
setMimeTypes(List<String> mimeTypes)
Sets the mime type to filter media items on. |
EmbeddedPhotoPickerFeatureInfo.Builder
|
setOrderedSelection(boolean orderedSelection)
Sets ordered selection of media items i.e. |
EmbeddedPhotoPickerFeatureInfo.Builder
|
setPreSelectedUris(List<Uri> preSelectedUris)
Sets list of uris to be pre-selected when embedded picker is opened. |
EmbeddedPhotoPickerFeatureInfo.Builder
|
setThemeNightMode(int themeNightMode)
Sets the embedded photo picker theme to light or dark irrespective of the device theme. |
Inherited methods | |
---|---|
Public constructors
Public methods
build
public EmbeddedPhotoPickerFeatureInfo build ()
Build the class for desired feature info arguments
Returns | |
---|---|
EmbeddedPhotoPickerFeatureInfo |
This value cannot be null . |
setAccentColor
public EmbeddedPhotoPickerFeatureInfo.Builder setAccentColor (long accentColor)
Sets accent color which will change color of primary picker elements like Done button, selected media icon colors, tab color etc.
The value of this intent-extra must be a string specifying the hex code of the accent color that is to be used within the picker.
This param is same as ERROR(/MediaStore#EXTRA_PICK_IMAGES_ACCENT_COLOR)
. See ERROR(/MediaStore#EXTRA_PICK_IMAGES_ACCENT_COLOR)
for more details on accepted colors.
Parameters | |
---|---|
accentColor |
long : Hex code of desired accent color. By default, the color of elements
will reflect based on device theme |
Returns | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |
setMaxSelectionLimit
public EmbeddedPhotoPickerFeatureInfo.Builder setMaxSelectionLimit (int maxSelectionLimit)
Sets maximum number of items that can be selected by the user
The value of this intent-extra should be a positive integer greater than
or equal to 1 and less than or equal to ERROR(/MediaStore#getPickImagesMaxLimit)
Parameters | |
---|---|
maxSelectionLimit |
int : Max selection count restriction. Pass limit as 1 to open
PhotoPicker in single-select mode. Default is multi select mode with limit as
ERROR(/MediaStore#getPickImagesMaxLimit())
Value is 1 or greater |
Returns | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |
setMimeTypes
public EmbeddedPhotoPickerFeatureInfo.Builder setMimeTypes (List<String> mimeTypes)
Sets the mime type to filter media items on.
Values may be a combination of concrete MIME types (such as "image/png") and/or partial MIME types (such as "image/*").
Parameters | |
---|---|
mimeTypes |
List : List of mime types to filter. By default, all media items
will be returned
This value cannot be null . |
Returns | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |
setOrderedSelection
public EmbeddedPhotoPickerFeatureInfo.Builder setOrderedSelection (boolean orderedSelection)
Sets ordered selection of media items i.e. this allows user to view/receive items in their selected order
Parameters | |
---|---|
orderedSelection |
boolean : Pass true to set ordered selection. Default is false |
Returns | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |
setPreSelectedUris
public EmbeddedPhotoPickerFeatureInfo.Builder setPreSelectedUris (List<Uri> preSelectedUris)
Sets list of uris to be pre-selected when embedded picker is opened.
This is same as ERROR(/MediaStore#EXTRA_PICKER_PRE_SELECTION_URIS)
.
See ERROR(/MediaStore#EXTRA_PICKER_PRE_SELECTION_URIS)
for more details
on restrictions and filter criteria.
Parameters | |
---|---|
preSelectedUris |
List : list of uris to be pre-selected
This value cannot be null . |
Returns | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |
setThemeNightMode
public EmbeddedPhotoPickerFeatureInfo.Builder setThemeNightMode (int themeNightMode)
Sets the embedded photo picker theme to light or dark irrespective of the device theme.
Parameters | |
---|---|
themeNightMode |
int : hex code of the desired Configuration.UI_MODE_NIGHT_MASK
value.
The default value is Supported values are - Configuration.UI_MODE_NIGHT_UNDEFINED -> system theme
Configuration.UI_MODE_NIGHT_YES -> dark theme
Configuration.UI_MODE_NIGHT_NO -> light theme |
Returns | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |