【发布时间】:2022-12-02 06:17:55
【问题描述】:
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.
【问题讨论】:
-
The ideal is that you put some example code that you have at the moment, so that we can test with it and provide you with a solution. But anyway, I believe that the problem you are having is related to the fact that the
LazyColumntries to occupy all the space below it when a fixed height is not provided, causing the components below to be "off the screen", the best way to handle this is to provide aModifier.weight(weight = 1F)for yourLazyColumn. Remembering that it is only possible to use.weight()if you are within the scope of aColumnorRow
标签: android android-studio kotlin android-jetpack-compose android-jetpack-compose-list