Język

AspectRatio Enum

Definition

Specifies the width-to-height ratio of thumbnails in the Photo Picker media grid.

public enum AspectRatio
type AspectRatio = 
Inheritance
AspectRatio

Fields

Name Value Description
Undefined -1

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

Android reference for android.widget.photopicker.PhotoPickerUiCustomizationParams.ASPECT_RATIO_UNDEFINED.

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.

Square11 0

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

Android reference for android.widget.photopicker.PhotoPickerUiCustomizationParams.ASPECT_RATIO_SQUARE_1_1.

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.

Portrait916 1

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

Android reference for android.widget.photopicker.PhotoPickerUiCustomizationParams.ASPECT_RATIO_PORTRAIT_9_16.

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.

Remarks

These values map to the ASPECT_RATIO_* constants declared by PhotoPickerUiCustomizationParams. The embedded picker uses this enum in SetAspectRatio(AspectRatio); it does not declare those constants. Undefined means that the app has not requested a ratio.

Android reference for Photo Picker thumbnail aspect ratios.

Android source for the aspect ratio constants.

Applies to