paging for home page people

This commit is contained in:
Owen LeJeune
2022-11-05 15:52:22 -04:00
parent 216457c148
commit 4a90e7c4e1
12 changed files with 191 additions and 71 deletions

View File

@@ -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