- Step 1 :-
private val sectionsList by lazy {
listOf("A", "B", "C", "D", "E")
} - Step 2 :-
sectionsList.forEach { section ->
stickyHeader {
Text(
modifier = Modifier
.fillMaxWidth()
.background(Color.LightGray)
.padding(12.dp),
text = "Section $section"
)
}
items(personList) {person->
CustomItem(person)
}
} - Step 3 :-
Screenshot :-
0 Comments