# MultiWindowModeChangedInfo

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/app/MultiWindowModeChangedInfo.kt+class:androidx.core.app.MultiWindowModeChangedInfo) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0)

*** ** * ** ***

<br />

```
public final class MultiWindowModeChangedInfo
```

<br />

*** ** * ** ***

Class that encapsulates the information that is delivered when `https://developer.android.com/reference/android/app/Activity.html#onMultiWindowModeChanged(boolean)` is dispatched to a `https://developer.android.com/reference/androidx/core/app/OnMultiWindowModeChangedProvider`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo#MultiWindowModeChangedInfo(kotlin.Boolean)(boolean isInMultiWindowMode)` |
| `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 26) https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo#MultiWindowModeChangedInfo(kotlin.Boolean,android.content.res.Configuration)( boolean isInMultiWindowMode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html newConfig )` Construct an instance that contains the new multi-window mode and the new configuration with the new multi-window mode applied. |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 26) https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo#getNewConfig()()` Gets the new `https://developer.android.com/reference/android/content/res/Configuration.html` of the with activity with the state `https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo#isInMultiWindowMode()` applied. |
| `final boolean` | `https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo#isInMultiWindowMode()()` Gets the new multi-window mode. |

## Public constructors

### MultiWindowModeChangedInfo

Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0)

```
public MultiWindowModeChangedInfo(boolean isInMultiWindowMode)
```

### MultiWindowModeChangedInfo

Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0)

```
@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. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html newConfig` | The new configuration of the activity with the state {@param isInMultiWindowMode}. |

## Public methods

### getNewConfig

Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0)

```
@RequiresApi(value = 26)
public final @NonNull Configuration getNewConfig()
```

Gets the new `https://developer.android.com/reference/android/content/res/Configuration.html` of the with activity with the state `https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo#isInMultiWindowMode()` applied.

Note that this is only valid on devices that are running API 26 (`https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#O`) or higher.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html` | The new configuration of the activity with the state `https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo#isInMultiWindowMode()`. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if the new `https://developer.android.com/reference/android/content/res/Configuration.html` is not available (i.e., you are running on a device less that `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#O` which is when this information first became available). |

### isInMultiWindowMode

Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0)

```
public final boolean isInMultiWindowMode()
```

Gets the new multi-window mode.

| Returns |
|---|---|
| `boolean` | True if the activity is in multi-window mode. |