# ActivityRule

Artifact: [androidx.window:window](https://developer.android.com/jetpack/androidx/releases/window) [View Source](https://cs.android.com/search?q=file:androidx/window/embedding/ActivityRule.kt+class:androidx.window.embedding.ActivityRule) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window#1.0.0)

*** ** * ** ***

<br />

```
class ActivityRule : EmbeddingRule
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.window.embedding.EmbeddingRule](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingRule) ||
|   | ↳ | [androidx.window.embedding.ActivityRule](https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityRule) |

*** ** * ** ***

Layout configuration rules for individual activities with split layouts. Take precedence over `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairRule`.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityRule.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityRule`. |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityRule#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityRule#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityRule#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityRule#alwaysExpand()` Whether the activity should always be expanded on launch. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityFilter>` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityRule#filters()` Filters used to choose when to apply this rule. |

### Inherited properties

From [androidx.window.embedding.EmbeddingRule](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingRule) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` `https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingRule#tag()`

A unique string to identify this `https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingRule`, which defaults to `null`.

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### alwaysExpand

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

```
val alwaysExpand: Boolean
```

Whether the activity should always be expanded on launch. Some activities are supposed to expand to the full task bounds, independent of the state of the split. An example is an activity that blocks all user interactions, such as a warning dialog.

### filters

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

```
val filters: Set<ActivityFilter>
```

Filters used to choose when to apply this rule. The rule will be applied if any one of the provided filters matches.