# WindowSizeClassGridCreator

Added in 1.6.0-alpha05

*** ** * ** ***


```
public final class WindowSizeClassGridCreator
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/core/layout/WindowSizeClass>` | `https://developer.android.com/reference/androidx/window/core/layout/WindowSizeClassGridCreator#(kotlin.collections.Set).addHeightDpBreakpoints(kotlin.collections.Set)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/core/layout/WindowSizeClass> receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> minHeightDpBreakPoints )` Creates a new `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` that contains the original `https://developer.android.com/reference/androidx/window/core/layout/WindowSizeClass` values in addition to new elements where the width is from the original set and the height is from `https://developer.android.com/reference/androidx/window/core/layout/package-summary#(kotlin.collections.Set).addHeightDpBreakpoints(kotlin.collections.Set)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/core/layout/WindowSizeClass>` | `https://developer.android.com/reference/androidx/window/core/layout/WindowSizeClassGridCreator#createGridWindowSizeClassSet(kotlin.collections.Set,kotlin.collections.Set)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> minWidthDpBreakPoints, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> minHeightDpBreakPoints )` Creates a new set of breakpoints by taking the cross product of `https://developer.android.com/reference/androidx/window/core/layout/package-summary#createGridWindowSizeClassSet(kotlin.collections.Set,kotlin.collections.Set)` and `https://developer.android.com/reference/androidx/window/core/layout/package-summary#createGridWindowSizeClassSet(kotlin.collections.Set,kotlin.collections.Set)`. |

## Public methods

### addHeightDpBreakpoints

Artifact: [androidx.window:window-core](https://developer.android.com/jetpack/androidx/releases/window) [View Source](https://cs.android.com/search?q=file:androidx/window/core/layout/WindowSizeClassGridCreator.kt+function:addHeightDpBreakpoints) Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/window#1.6.0-alpha05)

```
public static final @NonNull Set<@NonNull WindowSizeClass> addHeightDpBreakpoints(
    @NonNull Set<@NonNull WindowSizeClass> receiver,
    @NonNull Set<@NonNull Integer> minHeightDpBreakPoints
)
```

Creates a new `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` that contains the original `https://developer.android.com/reference/androidx/window/core/layout/WindowSizeClass` values in addition to new elements where the width is from the original set and the height is from `https://developer.android.com/reference/androidx/window/core/layout/package-summary#(kotlin.collections.Set).addHeightDpBreakpoints(kotlin.collections.Set)`. Note this method does not fill in any gaps in the original set. For example if the original set was { (10, 10), (20, 20) } and the height set is { 30 } the new set will be { (10, 10), (20, 20), (10, 30), (20, 30) }. To maintain a grid set the source set must also be a grid set.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> minHeightDpBreakPoints` | the height breakpoints in DP to construct the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/core/layout/WindowSizeClass>` | a new `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` that contains (minWidthDp, minHeightDp) for each pair possible taking the \* height breakpoint from `https://developer.android.com/reference/androidx/window/core/layout/package-summary#(kotlin.collections.Set).addHeightDpBreakpoints(kotlin.collections.Set)` and the width breakpoint from `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html`. |

### createGridWindowSizeClassSet

Artifact: [androidx.window:window-core](https://developer.android.com/jetpack/androidx/releases/window) [View Source](https://cs.android.com/search?q=file:androidx/window/core/layout/WindowSizeClassGridCreator.kt+function:createGridWindowSizeClassSet) Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/window#1.6.0-alpha05)

```
public static final @NonNull Set<@NonNull WindowSizeClass> createGridWindowSizeClassSet(
    @NonNull Set<@NonNull Integer> minWidthDpBreakPoints,
    @NonNull Set<@NonNull Integer> minHeightDpBreakPoints
)
```

Creates a new set of breakpoints by taking the cross product of `https://developer.android.com/reference/androidx/window/core/layout/package-summary#createGridWindowSizeClassSet(kotlin.collections.Set,kotlin.collections.Set)` and `https://developer.android.com/reference/androidx/window/core/layout/package-summary#createGridWindowSizeClassSet(kotlin.collections.Set,kotlin.collections.Set)`. For example, if the width set is {10, 20} and the height set is { 100, 200 } then the resulting set will be { (10, 100), (10, 200), (20, 100), (20, 200) }.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> minWidthDpBreakPoints` | the width breakpoints in DP to construct the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> minHeightDpBreakPoints` | the height breakpoints in DP to construct the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/core/layout/WindowSizeClass>` | a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` containing the breakpoints using a grid style |