Język

PhotoPickerUiCustomizationParams.Builder.SetAspectRatio(Int32) Method

Definition

Sets the desired aspect ratio for the media grid thumbnails within the Photo Picker UI.

[Android.Runtime.Register("setAspectRatio", "(I)Landroid/widget/photopicker/PhotoPickerUiCustomizationParams$Builder;", "", ApiSince=37)]
public Android.Widget.PhotoPicker.PhotoPickerUiCustomizationParams.Builder SetAspectRatio(int aspectRatio);
[<Android.Runtime.Register("setAspectRatio", "(I)Landroid/widget/photopicker/PhotoPickerUiCustomizationParams$Builder;", "", ApiSince=37)>]
member this.SetAspectRatio : int -> Android.Widget.PhotoPicker.PhotoPickerUiCustomizationParams.Builder

Parameters

aspectRatio
Int32

The integer value of one of the AspectRatio options. Cast the enum value to int before passing it.

Returns

This builder with the requested thumbnail aspect ratio configured.

Attributes

Remarks

Sets the desired aspect ratio for the media grid thumbnails within the Photo Picker UI.

The value must be one of the AspectRatio options: Undefined, Square11, or Portrait916. Cast the enum value to int before passing it. Any other value will result in throwing IllegalArgumentException.

If not set, Undefined will be used.

Android reference for android.widget.photopicker.PhotoPickerUiCustomizationParams.Builder.setAspectRatio.

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