語言

ActivityOptions.SetLaunchBounds(Rect) 方法

定義

設定活動應該啟動的範圍(視窗大小和位置)。

[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

參數

screenSpacePixelRect
Rect

發射邊界

傳回

this ActivityOptions 實例

屬性

備註

設定活動應該啟動的範圍(視窗大小和位置)。 矩形位置應以像素和螢幕座標表示。 注意:在未啟用PackageManager.FEATURE_FREEFORM_WINDOW_MANAGEMENT或PackageManager.FEATURE_PICTURE_IN_PICTURE的裝置,以及不支援自由形式與畫中畫視窗的顯示器上,此數值會被忽略。

Android 參考資料。android.app.ActivityOptions.setLaunchBounds

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於