PictureInPictureModeChangedInfo
public final class PictureInPictureModeChangedInfo
Class that encapsulates the information that is delivered when Activity.onPictureInPictureModeChanged is dispatched to a OnPictureInPictureModeChangedProvider.
Summary
Public constructors |
|---|
PictureInPictureModeChangedInfo(boolean isInPictureInPictureMode) |
@RequiresApi(value = 26)Construct an instance that contains the new picture-in-picture mode and the new configuration with the new picture-in-picture mode applied. |
Public methods |
|
|---|---|
final @NonNull Configuration |
@RequiresApi(value = 26)Gets the new |
final boolean |
Gets the new picture-in-picture mode. |
Public constructors
PictureInPictureModeChangedInfo
public PictureInPictureModeChangedInfo(boolean isInPictureInPictureMode)
PictureInPictureModeChangedInfo
@RequiresApi(value = 26)
public PictureInPictureModeChangedInfo(
boolean isInPictureInPictureMode,
@NonNull Configuration newConfig
)
Construct an instance that contains the new picture-in-picture mode and the new configuration with the new picture-in-picture mode applied.
| Parameters | |
|---|---|
boolean isInPictureInPictureMode |
True if the activity is in picture-in-picture mode. |
@NonNull Configuration newConfig |
The new configuration of the activity with the state {@param isInPictureInPictureMode}. |
Public methods
getNewConfig
@RequiresApi(value = 26)
public final @NonNull Configuration getNewConfig()
Gets the new Configuration of the with activity with the state isInPictureInPictureMode applied.
Note that this is only valid on devices that are running API 26 (android.os.Build.VERSION_CODES.O) or higher.
| Returns | |
|---|---|
@NonNull Configuration |
The new configuration of the activity with the state |
| Throws | |
|---|---|
kotlin.IllegalStateException |
if the new |
isInPictureInPictureMode
public final boolean isInPictureInPictureMode()
Gets the new picture-in-picture mode.
| Returns | |
|---|---|
boolean |
True if the activity is in picture-in-picture mode. |