Dela via


ActivityOptions.SetLaunchBounds(Rect) Method

Definition

Sets the bounds (window size and position) that the activity should be launched in.

[Android.Runtime.Register("setLaunchBounds", "(Landroid/graphics/Rect;)Landroid/app/ActivityOptions;", "GetSetLaunchBounds_Landroid_graphics_Rect_Handler", ApiSince=24)]
public virtual Android.App.ActivityOptions? SetLaunchBounds (Android.Graphics.Rect? screenSpacePixelRect);
[<Android.Runtime.Register("setLaunchBounds", "(Landroid/graphics/Rect;)Landroid/app/ActivityOptions;", "GetSetLaunchBounds_Landroid_graphics_Rect_Handler", ApiSince=24)>]
abstract member SetLaunchBounds : Android.Graphics.Rect -> Android.App.ActivityOptions
override this.SetLaunchBounds : Android.Graphics.Rect -> Android.App.ActivityOptions

Parameters

screenSpacePixelRect
Rect

launch bounds or null for fullscreen

Returns

this ActivityOptions instance

Attributes

Remarks

Sets the bounds (window size and position) that the activity should be launched in. Rect position should be provided in pixels and in screen coordinates. Set to null to explicitly launch fullscreen.

<strong>NOTE:</strong> This value is ignored on devices that don't have android.content.pm.PackageManager#FEATURE_FREEFORM_WINDOW_MANAGEMENT or android.content.pm.PackageManager#FEATURE_PICTURE_IN_PICTURE enabled.

Java documentation for android.app.ActivityOptions.setLaunchBounds(android.graphics.Rect).

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