# LazyListLayoutInfo

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/lazy/LazyListLayoutInfo.kt+class:androidx.compose.foundation.lazy.LazyListLayoutInfo) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0) Common/All
- Cmn

  ```
  interface LazyListLayoutInfo
  ```

*** ** * ** ***

Contains useful information about the currently displayed layout state of lazy lists like `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyColumn.composable#LazyColumn(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)` or `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyRow.composable#LazyRow(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)`. For example you can get the list of currently displayed item.

Use `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListState#layoutInfo()` to retrieve this

## Summary

| ### Public properties |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#afterContentPadding()` The content padding in pixels applied after the last item in the direction of scrolling. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#beforeContentPadding()` The content padding in pixels applied before the first item in the direction of scrolling. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#mainAxisItemSpacing()` The spacing between items in the direction of scrolling. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/Orientation` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#orientation()` The orientation of the lazy list. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#reverseLayout()` True if the direction of scrolling and layout is reversed. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#totalItemsCount()` The total count of items passed to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyColumn.composable#LazyColumn(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)` or `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyRow.composable#LazyRow(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#viewportEndOffset()` The end offset of the layout's viewport in pixels. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#viewportSize()` The size of the viewport in pixels. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#viewportStartOffset()` The start offset of the layout's viewport in pixels. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListItemInfo>` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#visibleItemsInfo()` The list of `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListItemInfo` representing all the currently visible items. | Cmn |

## Public properties

### afterContentPadding

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.2.0)

```
open val afterContentPadding: Int
```

The content padding in pixels applied after the last item in the direction of scrolling. For example it is a bottom content padding for LazyColumn with reverseLayout set to false.

### beforeContentPadding

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.2.0)

```
open val beforeContentPadding: Int
```

The content padding in pixels applied before the first item in the direction of scrolling. For example it is a top content padding for LazyColumn with reverseLayout set to false.

### mainAxisItemSpacing

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.4.0)

```
open val mainAxisItemSpacing: Int
```

The spacing between items in the direction of scrolling.

### orientation

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.2.0)

```
open val orientation: Orientation
```

The orientation of the lazy list.

### reverseLayout

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.2.0)

```
open val reverseLayout: Boolean
```

True if the direction of scrolling and layout is reversed.

### totalItemsCount

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0)

```
val totalItemsCount: Int
```

The total count of items passed to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyColumn.composable#LazyColumn(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)` or `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyRow.composable#LazyRow(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)`.

### viewportEndOffset

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0)

```
val viewportEndOffset: Int
```

The end offset of the layout's viewport in pixels. You can think of it as a maximum offset which would be visible. It is the size of the lazy list layout minus `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#beforeContentPadding()`.

You can use it to understand what items from `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#visibleItemsInfo()` are fully visible.

### viewportSize

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.2.0)

```
open val viewportSize: IntSize
```

The size of the viewport in pixels. It is the lazy list layout size including all the content paddings.

### viewportStartOffset

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0)

```
val viewportStartOffset: Int
```

The start offset of the layout's viewport in pixels. You can think of it as a minimum offset which would be visible. Usually it is 0, but it can be negative if non-zero `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#beforeContentPadding()` was applied as the content displayed in the content padding area is still visible.

You can use it to understand what items from `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#visibleItemsInfo()` are fully visible.

### visibleItemsInfo

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0)

```
val visibleItemsInfo: List<LazyListItemInfo>
```

The list of `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListItemInfo` representing all the currently visible items.