PictureInPictureParamsCompat
Helper class to access the framework android.app.PictureInPictureParams.
Builder is offered for a fluent API.
Constructors
Types
Builder class for PictureInPictureParamsCompat.
Properties
Sets the user actions. If there are more than ComponentActivity.getMaxNumPictureInPictureActions actions, then the input list will be truncated to that number.
Sets the aspect ratio. This aspect ratio is defined as the desired width / height, and does not change upon device rotation.
Sets a close action that should be invoked before the default close PiP action. The custom action must close the activity quickly using ComponentActivity.finish. Otherwise, the system will forcibly close the PiP as if no custom close action was provided.
Sets the aspect ratio for the expanded picture-in-picture mode. The aspect ratio is defined as the desired width / height. The aspect ratio cannot be changed from horizontal to vertical or vertical to horizontal while the PIP is shown. Any such changes will be ignored.
This field indicates the PiP-able state of the application, and it will be translated to PictureInPictureParams.isAutoEnterEnabled on API 31+.
Sets whether the system can seamlessly resize the window while the activity is in picture-in-picture mode. This should normally be the case for video content and when it's set to false, system will perform transitions to overcome the artifacts due to resize.
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.
Sets a subtitle for the picture-in-picture window, which may be displayed by the system to give the user more detailed information about what this PIP is displaying.
Sets a title for the picture-in-picture window, which may be displayed by the system to give the user information about what this PIP is generally being used for.
Functions
Provides the PictureInPictureParams represented by this object.