# SplitAttributesCalculatorParams

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

*** ** * ** ***

<br />

```
public final class SplitAttributesCalculatorParams
```

<br />

*** ** * ** ***

The parameter container used to report the current device and window state in `https://developer.android.com/reference/androidx/window/embedding/SplitController#setSplitAttributesCalculator(kotlin.Function1)` and references the corresponding `https://developer.android.com/reference/androidx/window/embedding/SplitRule` by `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#splitRuleTag()` if `https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule#tag()` is specified.

## Summary

| ### Public methods |
|---|---|
| `final boolean` | `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#areDefaultConstraintsSatisfied()()` Whether the `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#(androidx.window.layout.WindowMetrics,android.content.res.Configuration,androidx.window.layout.WindowLayoutInfo,androidx.window.embedding.SplitAttributes,kotlin.Boolean,kotlin.String)` satisfies the dimensions and aspect ratios requirements specified in the `https://developer.android.com/reference/androidx/window/embedding/SplitRule`, which are: |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/SplitAttributes` | `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#getDefaultSplitAttributes()()` The `https://developer.android.com/reference/androidx/window/embedding/SplitRule#defaultSplitAttributes()`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html` | `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#getParentConfiguration()()` The parent container's `https://developer.android.com/reference/android/content/res/Configuration.html` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` | `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#getParentWindowLayoutInfo()()` The parent container's `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowMetrics` | `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#getParentWindowMetrics()()` The parent container's `https://developer.android.com/reference/androidx/window/layout/WindowMetrics` |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#getSplitRuleTag()()` The `https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule#tag()` to apply this `https://developer.android.com/reference/androidx/window/embedding/SplitAttributes`, which is `null` if the tag is not set. |
| `@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/SplitAttributesCalculatorParams#toString()()` |

## Public methods

### areDefaultConstraintsSatisfied

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

```
public final boolean areDefaultConstraintsSatisfied()
```

Whether the `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#(androidx.window.layout.WindowMetrics,android.content.res.Configuration,androidx.window.layout.WindowLayoutInfo,androidx.window.embedding.SplitAttributes,kotlin.Boolean,kotlin.String)` satisfies the dimensions and aspect ratios requirements specified in the `https://developer.android.com/reference/androidx/window/embedding/SplitRule`, which are:

- `https://developer.android.com/reference/androidx/window/embedding/SplitRule#minWidthDp()`

- `https://developer.android.com/reference/androidx/window/embedding/SplitRule#minHeightDp()`

- `https://developer.android.com/reference/androidx/window/embedding/SplitRule#minSmallestWidthDp()`

- `https://developer.android.com/reference/androidx/window/embedding/SplitRule#maxAspectRatioInPortrait()`

- `https://developer.android.com/reference/androidx/window/embedding/SplitRule#maxAspectRatioInLandscape()`

### getDefaultSplitAttributes

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

```
public final @NonNull SplitAttributes getDefaultSplitAttributes()
```

The `https://developer.android.com/reference/androidx/window/embedding/SplitRule#defaultSplitAttributes()`. It could be from `https://developer.android.com/reference/androidx/window/embedding/SplitRule` Builder APIs (`https://developer.android.com/reference/androidx/window/embedding/SplitPairRule.Builder#setDefaultSplitAttributes(androidx.window.embedding.SplitAttributes)` or `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule.Builder#setDefaultSplitAttributes(androidx.window.embedding.SplitAttributes)`) or from the `splitRatio` and `splitLayoutDirection` attributes from static rule definitions.

### getParentConfiguration

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

```
public final @NonNull Configuration getParentConfiguration()
```

The parent container's `https://developer.android.com/reference/android/content/res/Configuration.html`

### getParentWindowLayoutInfo

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

```
public final @NonNull WindowLayoutInfo getParentWindowLayoutInfo()
```

The parent container's `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo`

### getParentWindowMetrics

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

```
public final @NonNull WindowMetrics getParentWindowMetrics()
```

The parent container's `https://developer.android.com/reference/androidx/window/layout/WindowMetrics`

### getSplitRuleTag

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

```
public final String getSplitRuleTag()
```

The `https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule#tag()` to apply this `https://developer.android.com/reference/androidx/window/embedding/SplitAttributes`, which is `null` if the tag is not set.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/SplitPairRule.Builder#setTag(kotlin.String)` |   |
| `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule.Builder#setTag(kotlin.String)` |   |

### toString

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