mirror of
https://github.com/owenlejeune/TVTime.git
synced 2025-11-20 10:40:53 -05:00
paging for home page people
This commit is contained in:
@@ -3,6 +3,7 @@ package com.owenlejeune.tvtime.extensions
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.lazy.LazyItemScope
|
||||
import androidx.compose.foundation.lazy.LazyListScope
|
||||
import androidx.compose.foundation.lazy.grid.GridItemSpan
|
||||
import androidx.compose.foundation.lazy.grid.LazyGridItemScope
|
||||
import androidx.compose.foundation.lazy.grid.LazyGridScope
|
||||
import androidx.compose.runtime.Composable
|
||||
@@ -27,6 +28,17 @@ fun <T: Any> LazyGridScope.listItems(
|
||||
}
|
||||
}
|
||||
|
||||
fun LazyGridScope.header(
|
||||
content: @Composable LazyGridItemScope.() -> Unit
|
||||
) {
|
||||
item(
|
||||
span = {
|
||||
GridItemSpan(maxLineSpan)
|
||||
},
|
||||
content = content
|
||||
)
|
||||
}
|
||||
|
||||
fun <T: Any> LazyListScope.listItems(
|
||||
items: Collection<T>,
|
||||
itemContent: @Composable (value: T) -> Unit
|
||||
|
||||
Reference in New Issue
Block a user