Language

MediaStore.ExtraPickImagesUiCustomizationParams Field

Definition

The name of an optional intent-extra used to set the ui customization options in the PhotoPicker.

[Android.Runtime.Register("EXTRA_PICK_IMAGES_UI_CUSTOMIZATION_PARAMS", ApiSince=37)]
public const string ExtraPickImagesUiCustomizationParams;
[<Android.Runtime.Register("EXTRA_PICK_IMAGES_UI_CUSTOMIZATION_PARAMS", ApiSince=37)>]
val mutable ExtraPickImagesUiCustomizationParams : string

Field Value

Attributes

Remarks

The name of an optional intent-extra used to set the ui customization options in the PhotoPicker.

The value of this intent-extra should be a PhotoPickerUiCustomizationParams object. The extra can only be specified in ActionPickImages.

Not passing this EXTRA, means the photo picker will use its default UI (e.g. rendering the media items grid in 1:1 aspect ratio).

To use this key, calling apps should construct a PhotoPickerUiCustomizationParams object using PhotoPickerUiCustomizationParams.Builder and pass it as the value.

Example: If the calling app wants to allow the Photo Picker to use a 9:16 aspect ratio for the thumbnails:

PhotoPickerUiCustomizationParams params = new PhotoPickerUiCustomizationParams.Builder()
    .setAspectRatio(PhotoPickerUiCustomizationParams.ASPECT_RATIO_PORTRAIT_9_16)
    .build();
Intent intent = new Intent(MediaStore.ACTION_PICK_IMAGES);
intent.putExtra(MediaStore.EXTRA_PICK_IMAGES_UI_CUSTOMIZATION_PARAMS, params);

Android reference for android.provider.MediaStore.EXTRA_PICK_IMAGES_UI_CUSTOMIZATION_PARAMS.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to