# SplitRule.FinishBehavior

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/window/embedding/SplitRule.FinishBehavior "View this page in Java")

<br />

```
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[SplitPairRule.finishPrimaryWithSecondary](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairRule#finishPrimaryWithSecondary())is[ADJACENT](https://developer.android.com/reference/kotlin/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                                                                           |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [finishPrimaryWithSecondary](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairRule#finishPrimaryWithSecondary())            |   |
| [finishSecondaryWithPrimary](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairRule#finishSecondaryWithPrimary())            |   |
| [finishPrimaryWithPlaceholder](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPlaceholderRule#finishPrimaryWithPlaceholder()) |   |

## Summary

|                                                ### Public companion properties                                                |
|-------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SplitRule.FinishBehavior](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitRule.FinishBehavior) | [ADJACENT](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitRule.FinishBehavior#ADJACENT()) Only finish the associated container when displayed adjacent to the one being finished. |
| [SplitRule.FinishBehavior](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitRule.FinishBehavior) | [ALWAYS](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitRule.FinishBehavior#ALWAYS()) Always finish the associated container independent of the current presentation mode.        |
| [SplitRule.FinishBehavior](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitRule.FinishBehavior) | [NEVER](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitRule.FinishBehavior#NEVER()) Never finish the associated container.                                                        |

|                                   ### Public functions                                   |
|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)       | [hashCode](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitRule.FinishBehavior#hashCode())`()` |
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [toString](https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitRule.FinishBehavior#toString())`()` |

## Public companion properties

### ADJACENT

```
val ADJACENT: SplitRule.FinishBehavior
```

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

```
val ALWAYS: SplitRule.FinishBehavior
```

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

### NEVER

```
val NEVER: SplitRule.FinishBehavior
```

Never finish the associated container.  

## Public functions

### hashCode

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

### toString

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