PictureInPictureUiState
class PictureInPictureUiState : Parcelable
Used by Activity#onPictureInPictureUiStateChanged(PictureInPictureUiState)
.
Summary
Inherited constants |
From class Parcelable
Int |
CONTENTS_FILE_DESCRIPTOR
Descriptor bit used with describeContents() : indicates that the Parcelable object's flattened representation includes a file descriptor.
|
Int |
PARCELABLE_WRITE_RETURN_VALUE
Flag for use with writeToParcel : the object being written is a return value, that is the result of a function such as "Parcelable someFunction() ", "void someFunction(out Parcelable) ", or "void someFunction(inout Parcelable) ". Some implementations may want to release resources at this point.
|
|
Public methods |
Int |
|
Boolean |
|
Int |
|
Boolean |
Returns whether Picture-in-Picture is stashed or not.
|
Unit |
Flatten this object in to a Parcel.
|
Public methods
describeContents
fun describeContents(): Int
equals
fun equals(other: Any?): Boolean
Parameters |
obj |
the reference object with which to compare. |
Return |
Boolean |
true if this object is the same as the obj argument; false otherwise. |
hashCode
fun hashCode(): Int
Return |
Int |
a hash code value for this object. |
isStashed
fun isStashed(): Boolean
Returns whether Picture-in-Picture is stashed or not. A stashed PiP means it is only partially visible to the user, with some parts of it being off-screen. This is usually a UI state that is triggered by the user, such as flinging the PiP to the edge or letting go of PiP while dragging partially off-screen. Developers can use this in conjunction with Activity#onPictureInPictureUiStateChanged(PictureInPictureUiState)
to get a signal when the PiP stash state has changed. For example, if the state changed from false
to true
, developers can choose to temporarily pause video playback if PiP is of video content. Vice versa, if changing from true
to false
and video content is paused, developers can resume video playback.
writeToParcel
fun writeToParcel(
out: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Properties