MultiWindowModeChangedInfo
public final class MultiWindowModeChangedInfo
Class that encapsulates the information that is delivered when Activity.onMultiWindowModeChanged is dispatched to a OnMultiWindowModeChangedProvider.
Summary
Public constructors |
|---|
MultiWindowModeChangedInfo(boolean isInMultiWindowMode) |
@RequiresApi(value = 26)Construct an instance that contains the new multi-window mode and the new configuration with the new multi-window mode applied. |
Public methods |
|
|---|---|
final @NonNull Configuration |
@RequiresApi(value = 26)Gets the new |
final boolean |
Gets the new multi-window mode. |
Public constructors
MultiWindowModeChangedInfo
public MultiWindowModeChangedInfo(boolean isInMultiWindowMode)
MultiWindowModeChangedInfo
@RequiresApi(value = 26)
public MultiWindowModeChangedInfo(
boolean isInMultiWindowMode,
@NonNull Configuration newConfig
)
Construct an instance that contains the new multi-window mode and the new configuration with the new multi-window mode applied.
| Parameters | |
|---|---|
boolean isInMultiWindowMode |
True if the activity is in multi-window mode. |
@NonNull Configuration newConfig |
The new configuration of the activity with the state {@param isInMultiWindowMode}. |
Public methods
getNewConfig
@RequiresApi(value = 26)
public final @NonNull Configuration getNewConfig()
Gets the new Configuration of the with activity with the state isInMultiWindowMode 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 |
isInMultiWindowMode
public final boolean isInMultiWindowMode()
Gets the new multi-window mode.
| Returns | |
|---|---|
boolean |
True if the activity is in multi-window mode. |