fix focus for android tv
This commit is contained in:
@@ -39,11 +39,20 @@ class ExpressiveSectionScope {
|
||||
contentType: ((T) -> Any)? = null,
|
||||
itemContent: @Composable (T) -> Unit
|
||||
) {
|
||||
items.forEach { t ->
|
||||
itemsIndexed(items, key, contentType) { _, t -> itemContent(t) }
|
||||
}
|
||||
|
||||
fun <T> itemsIndexed(
|
||||
items: List<T>,
|
||||
key: ((T) -> Any)? = null,
|
||||
contentType: ((T) -> Any)? = null,
|
||||
itemContent: @Composable (Int, T) -> Unit
|
||||
) {
|
||||
items.forEachIndexed { index, t ->
|
||||
nodes += ExpressiveNode(
|
||||
key = key?.invoke(t),
|
||||
contentType = contentType?.invoke(t),
|
||||
content = { itemContent(t) }
|
||||
content = { itemContent(index, t) }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user