# TestSplitAttributesCalculatorParams

Added in 1.2.0

*** ** * ** ***


```
public final class TestSplitAttributesCalculatorParams
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams` | `https://developer.android.com/reference/androidx/window/testing/embedding/TestSplitAttributesCalculatorParams#createTestSplitAttributesCalculatorParams(androidx.window.layout.WindowMetrics,android.content.res.Configuration,androidx.window.layout.WindowLayoutInfo,androidx.window.embedding.SplitAttributes,kotlin.Boolean,kotlin.String)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowMetrics parentWindowMetrics, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html parentConfiguration, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo parentWindowLayoutInfo, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/SplitAttributes defaultSplitAttributes, boolean areDefaultConstraintsSatisfied, https://developer.android.com/reference/java/lang/String.html splitRuleTag )` Returns an instance of `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams` for testing. |

## Public methods

### createTestSplitAttributesCalculatorParams

Artifact: [androidx.window:window-testing](https://developer.android.com/jetpack/androidx/releases/window) [View Source](https://cs.android.com/search?q=file:androidx/window/testing/embedding/SplitAttributesCalculatorParamsTesting.kt+function:TestSplitAttributesCalculatorParams) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/window#1.2.0)

```
public static final @NonNull SplitAttributesCalculatorParams createTestSplitAttributesCalculatorParams(
    @NonNull WindowMetrics parentWindowMetrics,
    @NonNull Configuration parentConfiguration,
    @NonNull WindowLayoutInfo parentWindowLayoutInfo,
    @NonNull SplitAttributes defaultSplitAttributes,
    boolean areDefaultConstraintsSatisfied,
    String splitRuleTag
)
```

Returns an instance of `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams` for testing. It is used to verify the developer implemented callback set by `https://developer.android.com/reference/androidx/window/embedding/SplitController#setSplitAttributesCalculator(kotlin.Function1)` by setting the relevant values in `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams` with this method.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowMetrics parentWindowMetrics` | The `https://developer.android.com/reference/androidx/window/layout/WindowMetrics` of the host task. See `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#parentWindowMetrics()`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html parentConfiguration` | The `https://developer.android.com/reference/android/content/res/Configuration.html` of the host task with empty `https://developer.android.com/reference/android/content/res/Configuration.html` as the default value. See `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#parentConfiguration()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo parentWindowLayoutInfo` | Used for reporting the `https://developer.android.com/reference/androidx/window/layout/FoldingFeature` with empty `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` as the default value. See `https://developer.android.com/reference/androidx/window/testing/layout/package-summary#TestWindowLayoutInfo(kotlin.collections.List,kotlin.collections.Set)` and `https://developer.android.com/reference/androidx/window/testing/layout/package-summary#FoldingFeature(android.app.Activity,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` for how to create test `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` with `https://developer.android.com/reference/androidx/window/layout/FoldingFeature`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/SplitAttributes defaultSplitAttributes` | The `https://developer.android.com/reference/androidx/window/embedding/SplitRule#defaultSplitAttributes()` or the `https://developer.android.com/reference/androidx/window/embedding/SplitRule#defaultSplitAttributes()` that the callback is applied a vertical equal `https://developer.android.com/reference/androidx/window/embedding/SplitAttributes` as the default value. See `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#defaultSplitAttributes()` |
| `boolean areDefaultConstraintsSatisfied` | `true` to indicate that the `https://developer.android.com/reference/androidx/window/testing/embedding/package-summary#TestSplitAttributesCalculatorParams(androidx.window.layout.WindowMetrics,android.content.res.Configuration,androidx.window.layout.WindowLayoutInfo,androidx.window.embedding.SplitAttributes,kotlin.Boolean,kotlin.String)` satisfies the constraints of `https://developer.android.com/reference/androidx/window/embedding/SplitPairRule` or `https://developer.android.com/reference/androidx/window/embedding/SplitPlaceholderRule` which defaults to `true`. See `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#areDefaultConstraintsSatisfied()` |
| `https://developer.android.com/reference/java/lang/String.html splitRuleTag` | The `https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule#tag()` or the `https://developer.android.com/reference/androidx/window/embedding/EmbeddingRule#tag()` that the callback is applied with `null` as the default value. See `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams#splitRuleTag()`. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/SplitAttributesCalculatorParams` |   |