Wishnuprathikantam
05/05/2022, 10:41 AMLazyPagingItems<Episodes>
How to use group by with LazyPagingItems? I want to implement a sticky header list here so i would need to convert this to Map<String,List<Episodes>> here. One way i can think of is using the itemSnapshot list, but not sure if it's a good practice. Any help is appreciated. Thanks.Jan Bína
05/05/2022, 12:29 PMPagingData.insertSeparators
function, I think that's what you are looking for.Wishnuprathikantam
05/05/2022, 1:10 PMlist.forEach { (k, v) ->
stickyHeader {
SeasonHeader(header = k)
}
items(v.count()) { key ->
val item = v[key]
EpisodeItem(
imageUrl = "",
productDescription = ,
)
}
}
This is how I'm currently populating the lazycolumn (using itemSnapshotList).