# EmbeddingRule

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

*** ** * ** ***

<br />

```
public abstract class EmbeddingRule
```

<br />

Known direct subclasses [ActivityRule](https://developer.android.com/reference/androidx/window/embedding/ActivityRule), [SplitRule](https://developer.android.com/reference/androidx/window/embedding/SplitRule)

|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/ActivityRule` | Layout configuration rules for individual activities with split layouts. |
| `https://developer.android.com/reference/androidx/window/embedding/SplitRule` | Split configuration rules for activities that are launched to side in a split. |

Known indirect subclasses [SplitPairRule](https://developer.android.com/reference/androidx/window/embedding/SplitPairRule), [SplitPinRule](https://developer.android.com/reference/androidx/window/embedding/SplitPinRule), [SplitPlaceholderRule](https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule)

|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/SplitPairRule` | Split configuration rules for activity pairs. |
| `https://developer.android.com/reference/androidx/window/embedding/SplitPinRule` | Split configuration rules for pinning an `https://developer.android.com/reference/androidx/window/embedding/ActivityStack`. |
| `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule` | Configuration rules for split placeholders. |

*** ** * ** ***

Base abstract class for activity embedding presentation rules, such as `https://developer.android.com/reference/androidx/window/embedding/SplitPairRule` and `https://developer.android.com/reference/androidx/window/embedding/ActivityRule`. Allows grouping different rule types together when updating.

## Summary

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `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`. |
| `int` | `https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule#hashCode()()` |

## Public methods

### equals

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

### getTag

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

```
public final String getTag()
```

A unique string to identify this `https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule`, which defaults to `null`. The suggested usage is to set the tag in the corresponding rule builder to be able to differentiate between different rules in the `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#splitRuleTag()`. For example, it can be used to compute the right `https://developer.android.com/reference/androidx/window/embedding/SplitAttributes` for the right split rule in callback set in `https://developer.android.com/reference/androidx/window/embedding/SplitController#setSplitAttributesCalculator(kotlin.Function1)`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/RuleController#addRule(androidx.window.embedding.EmbeddingRule)` |   |

### hashCode

```
public int hashCode()
```