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

```
public final class ActivityStack
```

<br />

*** ** * ** ***

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

## Summary

| ### Public methods |
|---|---|
| `final boolean` | `https://developer.android.com/reference/androidx/window/embedding/ActivityStack#contains(android.app.Activity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html activity)` Whether this `https://developer.android.com/reference/androidx/window/embedding/ActivityStack` contains the `https://developer.android.com/reference/androidx/window/embedding/ActivityStack#contains(android.app.Activity)`. |
| `boolean` | `https://developer.android.com/reference/androidx/window/embedding/ActivityStack#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `int` | `https://developer.android.com/reference/androidx/window/embedding/ActivityStack#hashCode()()` |
| `final boolean` | `https://developer.android.com/reference/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/androidx/window/embedding/ActivityStack`. |
| `@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/ActivityStack#toString()()` |

## Public methods

### contains

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

```
public final boolean contains(@NonNull Activity activity)
```

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

### equals

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

### hashCode

```
public int hashCode()
```

### isEmpty

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

```
public final boolean isEmpty()
```

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

Note that `https://developer.android.com/reference/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/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`.

### toString

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