PictureInPictureUiState.IsTransitioningToPip Property
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.
Returns true
if the app is going to enter Picture-in-Picture (PiP) mode.
public bool IsTransitioningToPip { [Android.Runtime.Register("isTransitioningToPip", "()Z", "", ApiSince=35)] get; }
[<get: Android.Runtime.Register("isTransitioningToPip", "()Z", "", ApiSince=35)>]
member this.IsTransitioningToPip : bool
Property Value
- Attributes
Remarks
Returns true
if the app is going to enter Picture-in-Picture (PiP) mode.
This state is associated with the entering PiP animation. When that animation starts, whether via auto enter PiP or calling Activity#enterPictureInPictureMode(PictureInPictureParams)
explicitly, app can expect Activity#onPictureInPictureUiStateChanged(PictureInPictureUiState)
callback with #isTransitioningToPip()
to be true
first, followed by Activity#onPictureInPictureModeChanged(boolean, Configuration)
when it fully settles in PiP mode.
When app receives the Activity#onPictureInPictureUiStateChanged(PictureInPictureUiState)
callback with #isTransitioningToPip()
being true
, it's recommended to hide certain UI elements, such as video controls, to archive a clean entering PiP animation.
In case an application wants to restore the previously hidden UI elements when exiting PiP, it is recommended to do that in onPictureInPictureModeChanged(isInPictureInPictureMode=false)
callback rather than the beginning of exit PiP animation.
Java documentation for android.app.PictureInPictureUiState.isTransitioningToPip()
.
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.