LazyLayoutMeasureScope
Interface
Common
sealed interface LazyLayoutMeasureScope : MeasureScope
The receiver scope of a LazyLayout
's measure lambda. The return value of the measure lambda is
MeasureResult
, which should be returned by layout
.
Call compose
to compose items emitted in a content block for a given index.
Functions
fun compose(@AndroidXIntRange(from = 0) index: Int): List<Measurable>
Compose an item of lazy layout.
Parameters
index | the item index. Should be no larger that LazyLayoutItemProvider.itemCount . |
Returns
List of Measurable s. Note that if you emitted multiple children into the item composable you will receive multiple measurebles. |
@ExperimentalFoundationApi
fun measure(index: Int, constraints: Constraints): List<Placeable>
Subcompose and measure the item of lazy layout.
Parameters
index | the item index. Should be no larger that LazyLayoutItemProvider.itemCount . |
constraints | Constraints to measure the children emitted into an item content composable specified via LazyLayoutItemProvider.Item . |
Returns
List of Placeable s. Note that if you emitted multiple children into the item composable you will receive multiple placeables, each of them will be measured with the passed constraints . |