mirror of
https://github.com/owenlejeune/TVTime.git
synced 2025-11-14 07:42:43 -05:00
create top level switch and palette view on settings page
This commit is contained in:
@@ -3,11 +3,12 @@ package com.owenlejeune.tvtime.extensions
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.lazy.LazyGridScope
|
||||
import androidx.compose.foundation.lazy.LazyItemScope
|
||||
import androidx.compose.foundation.lazy.LazyListScope
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.paging.compose.LazyPagingItems
|
||||
|
||||
@OptIn(ExperimentalFoundationApi::class)
|
||||
fun <T: Any> LazyGridScope.items(
|
||||
fun <T: Any> LazyGridScope.lazyPagingItems(
|
||||
lazyPagingItems: LazyPagingItems<T>,
|
||||
itemContent: @Composable LazyItemScope.(value: T?) -> Unit
|
||||
) {
|
||||
@@ -17,7 +18,16 @@ fun <T: Any> LazyGridScope.items(
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalFoundationApi::class)
|
||||
fun <T: Any> LazyGridScope.items(
|
||||
fun <T: Any> LazyGridScope.listItems(
|
||||
items: List<T>,
|
||||
itemContent: @Composable (value: T) -> Unit
|
||||
) {
|
||||
items(items.size) { index ->
|
||||
itemContent(items[index])
|
||||
}
|
||||
}
|
||||
|
||||
fun <T: Any> LazyListScope.listItems(
|
||||
items: List<T>,
|
||||
itemContent: @Composable (value: T) -> Unit
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user