Builder
class Builder
kotlin.Any | |
↳ | android.widget.photopicker.EmbeddedPhotoPickerFeatureInfo.Builder |
Summary
Public constructors | |
---|---|
Builder() |
Public methods | |
---|---|
EmbeddedPhotoPickerFeatureInfo |
build() Build the class for desired feature info arguments |
EmbeddedPhotoPickerFeatureInfo.Builder |
setAccentColor(accentColor: Long) Sets accent color which will change color of primary picker elements like Done button, selected media icon colors, tab color etc. |
EmbeddedPhotoPickerFeatureInfo.Builder |
setMaxSelectionLimit(maxSelectionLimit: Int) Sets maximum number of items that can be selected by the user |
EmbeddedPhotoPickerFeatureInfo.Builder |
setMimeTypes(mimeTypes: MutableList<String!>) Sets the mime type to filter media items on. |
EmbeddedPhotoPickerFeatureInfo.Builder |
setOrderedSelection(orderedSelection: Boolean) Sets ordered selection of media items i. |
EmbeddedPhotoPickerFeatureInfo.Builder |
setPreSelectedUris(preSelectedUris: MutableList<Uri!>) Sets list of uris to be pre-selected when embedded picker is opened. |
EmbeddedPhotoPickerFeatureInfo.Builder |
setThemeNightMode(themeNightMode: Int) Sets the embedded photo picker theme to light or dark irrespective of the device theme. |
Public constructors
Public methods
build
fun build(): EmbeddedPhotoPickerFeatureInfo
Build the class for desired feature info arguments
Return | |
---|---|
EmbeddedPhotoPickerFeatureInfo |
This value cannot be null . |
setAccentColor
fun setAccentColor(accentColor: Long): EmbeddedPhotoPickerFeatureInfo.Builder
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 MediaStore#EXTRA_PICK_IMAGES_ACCENT_COLOR. See 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 |
Return | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |
setMaxSelectionLimit
fun setMaxSelectionLimit(maxSelectionLimit: Int): EmbeddedPhotoPickerFeatureInfo.Builder
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 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 MediaStore#getPickImagesMaxLimit() Value is 1 or greater |
Return | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |
setMimeTypes
fun setMimeTypes(mimeTypes: MutableList<String!>): EmbeddedPhotoPickerFeatureInfo.Builder
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 |
MutableList<String!>: List of mime types to filter. By default, all media items will be returned This value cannot be null . |
Return | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |
setOrderedSelection
fun setOrderedSelection(orderedSelection: Boolean): EmbeddedPhotoPickerFeatureInfo.Builder
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 |
Return | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |
setPreSelectedUris
fun setPreSelectedUris(preSelectedUris: MutableList<Uri!>): EmbeddedPhotoPickerFeatureInfo.Builder
Sets list of uris to be pre-selected when embedded picker is opened.
This is same as MediaStore#EXTRA_PICKER_PRE_SELECTION_URIS. See MediaStore#EXTRA_PICKER_PRE_SELECTION_URIS for more details on restrictions and filter criteria.
Parameters | |
---|---|
preSelectedUris |
MutableList<Uri!>: list of uris to be pre-selected This value cannot be null . |
Return | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |
setThemeNightMode
fun setThemeNightMode(themeNightMode: Int): EmbeddedPhotoPickerFeatureInfo.Builder
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 |
Return | |
---|---|
EmbeddedPhotoPickerFeatureInfo.Builder |
This value cannot be null . |