MultiWindowModeChangedInfo

Added in 1.8.0

class MultiWindowModeChangedInfo


Class that encapsulates the information that is delivered when Activity.onMultiWindowModeChanged is dispatched to a OnMultiWindowModeChangedProvider.

Summary

Public constructors

MultiWindowModeChangedInfo(isInMultiWindowMode: Boolean)
@RequiresApi(value = 26)
MultiWindowModeChangedInfo(
    isInMultiWindowMode: Boolean,
    newConfig: Configuration
)

Construct an instance that contains the new multi-window mode and the new configuration with the new multi-window mode applied.

Public properties

Boolean

Gets the new multi-window mode.

Configuration

Gets the new Configuration of the with activity with the state isInMultiWindowMode applied.

Public constructors

MultiWindowModeChangedInfo

Added in 1.8.0
MultiWindowModeChangedInfo(isInMultiWindowMode: Boolean)
Parameters
isInMultiWindowMode: Boolean

Gets the new multi-window mode.

MultiWindowModeChangedInfo

Added in 1.8.0
@RequiresApi(value = 26)
MultiWindowModeChangedInfo(
    isInMultiWindowMode: Boolean,
    newConfig: Configuration
)

Construct an instance that contains the new multi-window mode and the new configuration with the new multi-window mode applied.

Parameters
isInMultiWindowMode: Boolean

True if the activity is in multi-window mode.

newConfig: Configuration

The new configuration of the activity with the state {@param isInMultiWindowMode}.

Public properties

isInMultiWindowMode

Added in 1.8.0
val isInMultiWindowMode: Boolean

Gets the new multi-window mode.

Returns
Boolean

True if the activity is in multi-window mode.

newConfig

Added in 1.8.0
val newConfig: Configuration

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
Configuration

The new configuration of the activity with the state isInMultiWindowMode.

Throws
IllegalStateException

if the new Configuration is not available (i.e., you are running on a device less that android.os.Build.VERSION_CODES.O which is when this information first became available).