# ActivityStack

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

*** ** * ** ***

<br />

```
class ActivityStack
```

<br />

*** ** * ** ***

A container that holds a stack of activities, overlapping and bound to the same rectangle on the screen.

## Summary

| ### Public functions |
|---|---|
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack#contains(android.app.Activity)(activity: https://developer.android.com/reference/android/app/Activity.html)` Whether this `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack` contains the `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack#contains(android.app.Activity)`. |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack#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/ActivityStack#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack#isEmpty()` Whether there is no `https://developer.android.com/reference/android/app/Activity.html` running in this `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack`. |

## Public functions

### contains

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

```
operator fun contains(activity: Activity): Boolean
```

Whether this `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack` contains the `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack#contains(android.app.Activity)`.

### equals

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

### hashCode

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

### toString

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

## Public properties

### isEmpty

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

```
val isEmpty: Boolean
```

Whether there is no `https://developer.android.com/reference/android/app/Activity.html` running in this `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack`.

Note that `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack#(kotlin.collections.List,kotlin.Boolean,androidx.window.extensions.embedding.ActivityStack.Token)` only report `https://developer.android.com/reference/android/app/Activity.html` in the process used to create this ActivityStack. That said, if this ActivityStack only contains activities from other process(es), `https://developer.android.com/reference/kotlin/androidx/window/embedding/ActivityStack#(kotlin.collections.List,kotlin.Boolean,androidx.window.extensions.embedding.ActivityStack.Token)` will return an empty list, but this method will return `false`.