# GridCells

# GridCells

Artifact:[androidx.glance:glance-appwidget](https://developer.android.com/jetpack/androidx/releases/glance)  
[View Source](https://cs.android.com/search?q=file:androidx/glance/appwidget/lazy/LazyVerticalGrid.kt+class:androidx.glance.appwidget.lazy.GridCells)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)

<br />

```
sealed class GridCells
```

<br />

Known direct subclasses  
[GridCells.Adaptive](https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells.Adaptive),[GridCells.Fixed](https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells.Fixed)  

|------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [GridCells.Adaptive](https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells.Adaptive) | Defines a grid with as many columns as possible on the condition that every cell has at least[minSize](https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells.Adaptive#minSize())space and all extra space distributed evenly. |
| [GridCells.Fixed](https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells.Fixed)       | Defines a fixed number of columns, limited to 1 through 5.                                                                                                                                                                                                      |

*** ** * ** ***

Defines the number of columns of the GridView.

## Summary

|                                                                                                                                                                                                                                                                                                    ### Nested types                                                                                                                                                                                                                                                                                                    |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[RequiresApi](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi)`(value = 31)` `class `[GridCells.Adaptive](https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells.Adaptive)` : `[GridCells](https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells) Defines a grid with as many columns as possible on the condition that every cell has at least[minSize](https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells.Adaptive#minSize())space and all extra space distributed evenly. |
| `class `[GridCells.Fixed](https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells.Fixed)` : `[GridCells](https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells) Defines a fixed number of columns, limited to 1 through 5.                                                                                                                                                                                                                                                                                                                           |

|                                              ### Protected constructors                                              |
|----------------------------------------------------------------------------------------------------------------------|
| [GridCells](https://developer.android.com/reference/kotlin/androidx/glance/appwidget/lazy/GridCells#GridCells())`()` |

## Protected constructors

### GridCells

```
protected GridCells()
```