File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
compose/snippets/src/main/java/com/example/compose/snippets/lists Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ package com.example.compose.snippets.lists
2+
3+ import androidx.compose.foundation.layout.size
4+ import androidx.compose.foundation.lazy.LazyColumn
5+ import androidx.compose.foundation.lazy.LazyRow
6+ import androidx.compose.material3.Text
7+ import androidx.compose.runtime.Composable
8+ import androidx.compose.ui.Modifier
9+ import androidx.compose.ui.unit.dp
10+ import coil.compose.AsyncImage
11+
12+ // [START android_compose_layouts_nested_scrolling]
13+ @Composable
14+ fun NestedScrollingRowsList (urls : List <String >) {
15+ LazyColumn {
16+ items(10 ) {
17+ LazyRow {
18+ item { Text (" Row: $it " ) }
19+ items(urls.size) { index ->
20+ // AsyncImage provided by Coil.
21+ AsyncImage (
22+ model = urls[index],
23+ modifier = Modifier .size(150 .dp),
24+ contentDescription = null
25+ )
26+ }
27+ }
28+ }
29+ }
30+ }
31+ // [END android_compose_layouts_nested_scrolling]
You can’t perform that action at this time.
0 commit comments