Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I want to achieve the below layout, the button should be at the bottom of the screen, when the lazy column is filled, the button shouldn't go outside

There is lazy column at top and below the lazy column there is enter phone number layout and add contact from phonebook layout, I want this layout to be at top when no contact is added and when I add lots of contact the enter phone number and add contact from phonebook layout scrolls along with the lazy column and goes outside of the screen. I don't them to go outside of the screen. They must stick to bottom when there is lots of contact.

enter image description here

like image 368
Kunal Kalwar Avatar asked Oct 23 '25 11:10

Kunal Kalwar


1 Answers

You can apply the weight modifier to the LazyColumn.
Something like:

Column(){

    LazyColumn(Modifier.weight(weight = 1f, fill = false)) {
        //....
    }

    Footer()
}

Using fill=false the element will not occupy the whole width allocated.

enter image description here

like image 89
Gabriele Mariotti Avatar answered Oct 25 '25 02:10

Gabriele Mariotti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!