PictureInPictureParams.Builder.SetSourceRectHint(Rect) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the window-coordinate bounds of an activity transitioning to picture-in-picture.
[Android.Runtime.Register("setSourceRectHint", "(Landroid/graphics/Rect;)Landroid/app/PictureInPictureParams$Builder;", "GetSetSourceRectHint_Landroid_graphics_Rect_Handler", ApiSince=26)]
public virtual Android.App.PictureInPictureParams.Builder? SetSourceRectHint(Android.Graphics.Rect? launchBounds);
[<Android.Runtime.Register("setSourceRectHint", "(Landroid/graphics/Rect;)Landroid/app/PictureInPictureParams$Builder;", "GetSetSourceRectHint_Landroid_graphics_Rect_Handler", ApiSince=26)>]
abstract member SetSourceRectHint : Android.Graphics.Rect -> Android.App.PictureInPictureParams.Builder
override this.SetSourceRectHint : Android.Graphics.Rect -> Android.App.PictureInPictureParams.Builder
Parameters
- launchBounds
- Rect
Rect: window-coordinate bounds indicating the area of the activity that will still be visible following the transition into picture-in-picture (e.g. the video view bounds in a video player)
Returns
this builder instance.
- Attributes
Remarks
Sets the window-coordinate bounds of an activity transitioning to picture-in-picture. The bounds is the area of an activity that will be visible in the transition to picture-in-picture mode. For the best effect, these bounds should also match the aspect ratio in the arguments. In Android 12+ these bounds are also reused to improve the exit transition from picture-in-picture mode. See Support smoother animations when exiting out of PiP mode for more details.
Android reference for android.app.PictureInPictureParams.Builder.setSourceRectHint.
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.