# SplitPlaceholderRule

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

*** ** * ** ***

<br />

```
public final class SplitPlaceholderRule extends SplitRule
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [androidx.window.embedding.EmbeddingRule](https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule) |||
|   | ↳ | [androidx.window.embedding.SplitRule](https://developer.android.com/reference/androidx/window/embedding/SplitRule) ||
|   |   | ↳ | [androidx.window.embedding.SplitPlaceholderRule](https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule) |

*** ** * ** ***

Configuration rules for split placeholders.

A placeholder activity is usually a mostly empty activity that temporarily occupies the secondary container of a split. The placeholder is intended to be replaced when another activity with content is launched in a dedicated `https://developer.android.com/reference/androidx/window/embedding/SplitPairRule`. The placeholder activity is then occluded by the newly launched activity. The placeholder can provide some optional features but must not host important UI elements exclusively, since the placeholder is not shown on some devices and screen configurations, such as devices with small screens.

Configuration rules can be added using `https://developer.android.com/reference/androidx/window/embedding/RuleController#addRule(androidx.window.embedding.EmbeddingRule)` or `https://developer.android.com/reference/androidx/window/embedding/RuleController#setRules(kotlin.collections.Set)`.

See [Activity embedding](https://developer.android.com/guide/topics/large-screens/activity-embedding#placeholders) for more information.

## Summary

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

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/ActivityFilter>` | `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule#getFilters()()` Filters used to choose when to apply this rule. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/SplitRule.FinishBehavior` | `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule#getFinishPrimaryWithPlaceholder()()` Determines what happens with the primary container when all activities are finished in the associated placeholder container. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html` | `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule#getPlaceholderIntent()()` Intent to launch the placeholder activity. |
| `int` | `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule#hashCode()()` |
| `final boolean` | `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule#isSticky()()` Determines whether the placeholder will show on top in a smaller window size after it first appeared in a split with sufficient minimum width. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule#toString()()` |

### Inherited methods

From [androidx.window.embedding.EmbeddingRule](https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule) `final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule#getTag()()`

A unique string to identify this `https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule`, which defaults to `null`.
From [androidx.window.embedding.SplitRule](https://developer.android.com/reference/androidx/window/embedding/SplitRule) `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/SplitAttributes` `https://developer.android.com/reference/androidx/window/embedding/SplitRule#getDefaultSplitAttributes()()`

The default `https://developer.android.com/reference/androidx/window/embedding/SplitAttributes` to apply on the activity containers pair when the host task bounds satisfy `https://developer.android.com/reference/androidx/window/embedding/SplitRule#(kotlin.String,kotlin.Int,kotlin.Int,kotlin.Int,androidx.window.embedding.EmbeddingAspectRatio,androidx.window.embedding.EmbeddingAspectRatio,androidx.window.embedding.SplitAttributes)`, `https://developer.android.com/reference/androidx/window/embedding/SplitRule#(kotlin.String,kotlin.Int,kotlin.Int,kotlin.Int,androidx.window.embedding.EmbeddingAspectRatio,androidx.window.embedding.EmbeddingAspectRatio,androidx.window.embedding.SplitAttributes)`, `https://developer.android.com/reference/androidx/window/embedding/SplitRule#(kotlin.String,kotlin.Int,kotlin.Int,kotlin.Int,androidx.window.embedding.EmbeddingAspectRatio,androidx.window.embedding.EmbeddingAspectRatio,androidx.window.embedding.SplitAttributes)`, `https://developer.android.com/reference/androidx/window/embedding/SplitRule#(kotlin.String,kotlin.Int,kotlin.Int,kotlin.Int,androidx.window.embedding.EmbeddingAspectRatio,androidx.window.embedding.EmbeddingAspectRatio,androidx.window.embedding.SplitAttributes)` and `https://developer.android.com/reference/androidx/window/embedding/SplitRule#(kotlin.String,kotlin.Int,kotlin.Int,kotlin.Int,androidx.window.embedding.EmbeddingAspectRatio,androidx.window.embedding.EmbeddingAspectRatio,androidx.window.embedding.SplitAttributes)` requirements.
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/EmbeddingAspectRatio` `https://developer.android.com/reference/androidx/window/embedding/SplitRule#getMaxAspectRatioInLandscape()()`

The largest value of the aspect ratio, expressed as `width / height` in decimal form, of the parent window bounds in landscape when the split should be used.
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/EmbeddingAspectRatio` `https://developer.android.com/reference/androidx/window/embedding/SplitRule#getMaxAspectRatioInPortrait()()`

The largest value of the aspect ratio, expressed as `height / width` in decimal form, of the parent window bounds in portrait when the split should be used.
`final int` `https://developer.android.com/reference/androidx/window/embedding/SplitRule#getMinHeightDp()()`

The smallest value of height of the parent task window when the split should be used, in DP.
`final int` `https://developer.android.com/reference/androidx/window/embedding/SplitRule#getMinSmallestWidthDp()()`

The smallest value of the smallest possible width of the parent task window in any rotation when the split should be used, in DP.
`final int` `https://developer.android.com/reference/androidx/window/embedding/SplitRule#getMinWidthDp()()`

The smallest value of width of the parent task window when the split should be used, in DP.

## Public methods

### equals

```
public boolean equals(Object other)
```

### getFilters

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

```
public final @NonNull Set<@NonNull ActivityFilter> getFilters()
```

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

### getFinishPrimaryWithPlaceholder

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

```
public final @NonNull SplitRule.FinishBehavior getFinishPrimaryWithPlaceholder()
```

Determines what happens with the primary container when all activities are finished in the associated placeholder container.

**Note** that it is not valid to set `https://developer.android.com/reference/androidx/window/embedding/SplitRule.FinishBehavior#NEVER()`

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/SplitRule.FinishBehavior#ALWAYS()` |   |
| `https://developer.android.com/reference/androidx/window/embedding/SplitRule.FinishBehavior#ADJACENT()` |   |

### getPlaceholderIntent

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

```
public final @NonNull Intent getPlaceholderIntent()
```

Intent to launch the placeholder activity.

### hashCode

```
public int hashCode()
```

### isSticky

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

```
public final boolean isSticky()
```

Determines whether the placeholder will show on top in a smaller window size after it first appeared in a split with sufficient minimum width.

### toString

```
public @NonNull String toString()
```