https://kotlinlang.org logo
n

nuhkoca

09/15/2022, 11:22 PM
Hello, Is it possible to have 2 sticky headers in a row in
LazyList
?
k

Kirill Grouchnikov

09/15/2022, 11:47 PM
How does that look like in your design mock?
y

yogaboy

09/16/2022, 7:01 AM
Yeah .. I’m interested in that too. What do the 2 headings look like that should behave like stickz headers
I think the filter (sorter) not needs to be sticky. The sorter just resort the list (ETF, Stocks) and it’s out of the lazycolumn scope
n

nuhkoca

09/16/2022, 12:27 PM
How, should I wrap the LazyList in a Column then?
y

yogaboy

09/16/2022, 12:29 PM
of course
Or a Card or Box .. what is better for you .. aka
Copy code
Card(
        modifier = Modifier
            .fillMaxWidth(),
        shape = RoundedCornerShape(0.dp),
        colors = CardDefaults.cardColors(
            containerColor =  MaterialTheme.colorScheme.background,

        )
    ) {
        Text(
            text = "Sorter",
            modifier = Modifier.padding(8.dp)
        )
    }
    LazyColumn(
        modifier = Modifier
            .background(MaterialTheme.colorScheme.background)
            .wrapContentHeight()
            .fillMaxWidth(),
        verticalArrangement = Arrangement.spacedBy(0.dp),
        reverseLayout = false
    ) {}
n

nuhkoca

09/17/2022, 9:26 AM
Ohh got it thanks a lot, will try it out!
2 Views