Is there something like ScrollView `fillViewPort` ...
# compose
m
Is there something like ScrollView
fillViewPort
but for
LazyColumn
(or
Column
)? The point is to do something like this.
a
you can create your own
Arrangement.Vertical
which puts the latest item to the bottom and pass it as
verticalArrangement
param
m
Wow, sounds great (kinda amazing how flexible compose is). Will try that, thanks
n
@Andrey Kulikov could you help me how to do this? In my case I want to achieve this UI using a
Column
a
Copy code
Column(verticalArrangement = remember {
    object : Arrangement.Vertical {
        override fun Density.arrange(
            totalSize: Int,
            sizes: IntArray,
            outPositions: IntArray
        ) {
            var currentOffset = 0
            sizes.forEachIndexed { index, size -> 
                if (index == sizes.lastIndex) {
                    outPositions[index] = totalSize - size
                } else {
                    outPositions[index] = currentOffset
                    currentOffset += size
                }
            }
        }
    }
})
something like this
n
thanks… but didn’t work if I use
verticalScroll
😞
380 Views