# GridLayout.Alignment

Artifact: [androidx.gridlayout:gridlayout](https://developer.android.com/jetpack/androidx/releases/gridlayout) [View Source](https://cs.android.com/search?q=file:androidx/gridlayout/widget/GridLayout.java+class:androidx.gridlayout.widget.GridLayout.Alignment) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/gridlayout#1.0.0)

*** ** * ** ***


```
public abstract class GridLayout.Alignment
```

<br />

*** ** * ** ***

Alignments specify where a view should be placed within a cell group and what size it should be.

The `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout.LayoutParams` class contains a `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout.LayoutParams#rowSpec()` and a `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout.LayoutParams#columnSpec()` each of which contains an `alignment`. Overall placement of the view in the cell group is specified by the two alignments which act along each axis independently.

The GridLayout class defines the most common alignments used in general layout: `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout#TOP()`, `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout#LEFT()`, `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout#BOTTOM()`, `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout#RIGHT()`, `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout#START()`, `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout#END()`, `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout#CENTER()`, `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout#BASELINE()` and `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout#FILL()`.

## Summary

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/gridlayout/widget/GridLayout.Alignment#toString()()` |

## Public methods

### toString

```
public String toString()
```