0

I have an overall composable with a title composable with text - beneath a lazycolumn composable and beneath again a composable with a button

Column(horizontalAlignment = Alignment.CenterHorizontally,
    modifier = Modifier
        .fillMaxWidth()
        .background(Color(0xFFFAD173))
) {
    DCLCTitle()
    DCList(ListDSState)
    DCListButton()
}

It is ok, when the list contains only a small number of items - but when it holds maybe 50 items - then the lazycolumn overlapping the button and the button vanished - how can I set the three parts maybe to 20/60/20 or to title/buttom/layzcolumn remaining space

Help would be great

VFarkas2023
  • 295
  • 1
  • 1
  • 8

1 Answers1

0

To set the parts to 20/60/20 you can pass the modifier through parameter.

  DCLCTitle(Modifier.weight(0.2f))
  DCList(Modifier.weight(0.6f))
  DCListButton(Modifier.weight(0.2f))

@Composable
fun DCLCTitle(modifier:Modifier) {
   //example composable content
    Box(modifier = modifier){}
}

or if you want to make it title/buttom/layzcolumn remaining space then

DCLCTitle()
DCListButton()
DCList(Modifier.weight(1f))

and pass the pass the modifier only through the DCList paramter.