# ScalingLazyListLayoutInfo

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


```
sealed interface ScalingLazyListLayoutInfo
```

<br />

*** ** * ** ***

Contains useful information about the currently displayed layout state of `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyColumn.composable#ScalingLazyColumn(androidx.compose.ui.Modifier,androidx.wear.compose.foundation.lazy.ScalingLazyListState,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.wear.compose.foundation.lazy.ScalingParams,androidx.wear.compose.foundation.lazy.ScalingLazyListAnchorType,androidx.wear.compose.foundation.lazy.AutoCenteringParams,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)`. For example you can get the list of currently displayed items.

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

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#afterAutoCenteringPadding()` The auto centering padding in pixels applied after the last item in the direction of scrolling. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#afterContentPadding()` The content padding in pixels applied after the last item in the direction of scrolling. |
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListAnchorType` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#anchorType()` How to anchor list items to the center-line of the viewport |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#beforeAutoCenteringPadding()` The auto centering padding in pixels applied before the first item in the direction of scrolling. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#beforeContentPadding()` The content padding in pixels applied before the first item in the direction of scrolling. |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/Orientation` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#orientation()` The orientation of the scaling lazy list. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#reverseLayout()` True if the direction of scrolling and layout is reversed. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#totalItemsCount()` The total count of items passed to `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyColumn.composable#ScalingLazyColumn(androidx.compose.ui.Modifier,androidx.wear.compose.foundation.lazy.ScalingLazyListState,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.wear.compose.foundation.lazy.ScalingParams,androidx.wear.compose.foundation.lazy.ScalingLazyListAnchorType,androidx.wear.compose.foundation.lazy.AutoCenteringParams,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#viewportEndOffset()` The end offset of the layout's viewport in pixels. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#viewportSize()` The size of the viewport in pixels. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#viewportStartOffset()` The start offset of the layout's viewport in pixels. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListItemInfo>` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#visibleItemsInfo()` The list of `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListItemInfo` representing all the currently visible items. |

## Public properties

### afterAutoCenteringPadding

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

```
val afterAutoCenteringPadding: Int
```

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

### afterContentPadding

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

```
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 ScalingLazyColumn with reverseLayout set to false.

### anchorType

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

```
val anchorType: ScalingLazyListAnchorType
```

How to anchor list items to the center-line of the viewport

### beforeAutoCenteringPadding

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

```
val beforeAutoCenteringPadding: Int
```

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

### beforeContentPadding

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

```
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 ScalingLazyColumn with reverseLayout set to false.

### orientation

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

```
val orientation: Orientation
```

The orientation of the scaling lazy list.

### reverseLayout

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

```
val reverseLayout: Boolean
```

True if the direction of scrolling and layout is reversed.

### totalItemsCount

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

```
val totalItemsCount: Int
```

The total count of items passed to `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyColumn.composable#ScalingLazyColumn(androidx.compose.ui.Modifier,androidx.wear.compose.foundation.lazy.ScalingLazyListState,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.wear.compose.foundation.lazy.ScalingParams,androidx.wear.compose.foundation.lazy.ScalingLazyListAnchorType,androidx.wear.compose.foundation.lazy.AutoCenteringParams,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,androidx.compose.foundation.OverscrollEffect,kotlin.Function1)`.

### viewportEndOffset

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.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 scaling lazy list layout minus `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#beforeContentPadding()`.

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

### viewportSize

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

```
val viewportSize: IntSize
```

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

### viewportStartOffset

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.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/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#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/wear/compose/foundation/lazy/ScalingLazyListLayoutInfo#visibleItemsInfo()` are fully visible.

### visibleItemsInfo

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

```
val visibleItemsInfo: List<ScalingLazyListItemInfo>
```

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