# SplitRule.FinishBehavior

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

*** ** * ** ***


```
public final class SplitRule.FinishBehavior
```

<br />

*** ** * ** ***

Determines what happens with the associated container when all activities are finished in one of the containers in a split.

For example, given that `https://developer.android.com/reference/androidx/window/embedding/SplitPairRule#finishPrimaryWithSecondary()` is `https://developer.android.com/reference/androidx/window/embedding/SplitRule.FinishBehavior#ADJACENT()` and secondary container finishes. The primary associated container is finished if it's adjacent to the secondary container. The primary associated container is not finished if it occupies entire task bounds.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/SplitPairRule#finishPrimaryWithSecondary()` |   |
| `https://developer.android.com/reference/androidx/window/embedding/SplitPairRule#finishSecondaryWithPrimary()` |   |
| `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule#finishPrimaryWithPlaceholder()` |   |

## Summary

| ### Public fields |
|---|---|
| `static 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/SplitRule.FinishBehavior#ADJACENT()` Only finish the associated container when displayed adjacent to the one being finished. |
| `static 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/SplitRule.FinishBehavior#ALWAYS()` Always finish the associated container independent of the current presentation mode. |
| `static 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/SplitRule.FinishBehavior#NEVER()` Never finish the associated container. |

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/window/embedding/SplitRule.FinishBehavior#hashCode()()` |
| `@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/SplitRule.FinishBehavior#toString()()` |

## Public fields

### ADJACENT

```
public static final @NonNull SplitRule.FinishBehavior ADJACENT
```

Only finish the associated container when displayed adjacent to the one being finished. Does not finish the associated one when containers are stacked on top of each other.

### ALWAYS

```
public static final @NonNull SplitRule.FinishBehavior ALWAYS
```

Always finish the associated container independent of the current presentation mode.

### NEVER

```
public static final @NonNull SplitRule.FinishBehavior NEVER
```

Never finish the associated container.

## Public methods

### hashCode

```
public int hashCode()
```

### toString

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