buszi0809
01/09/2021, 10:54 AMDominaezzz
01/09/2021, 12:45 PMbuszi0809
01/09/2021, 2:07 PMConstraintLayout (
modifier = Modifier
.fillMaxSize()
.background(color = MaterialTheme.colors.background)
) {
val (conversation, userInputBar) = createRefs()
UserInputBar(modifier = Modifier.constrainAs(userInputBar){
bottom.linkTo(parent.bottom)
linkTo(start = parent.start, end = parent.end)
}, onSend = viewModel::onSend)
Conversation(
list = viewModel.messages,
modifier = Modifier.constrainAs(conversation) {
top.linkTo(<http://parent.top|parent.top>)
bottom.linkTo(<http://userInputBar.top|userInputBar.top>, margin = 100.dp)
linkTo(start = parent.start, end = parent.end)
})
}
Here is the declaration of ConstraintLayout containerbuszi0809
01/09/2021, 2:09 PMDominaezzz
01/09/2021, 2:16 PMmargin
for?buszi0809
01/09/2021, 2:17 PMDominaezzz
01/09/2021, 2:22 PMfillMaxSize()
in Conversation()
is quite suspicious. Try without it. (We shouldn't be adding (non-preferred) size modifiers when a modifier is passed as a parameter)buszi0809
01/09/2021, 2:28 PMDominaezzz
01/09/2021, 2:29 PMbuszi0809
01/09/2021, 2:42 PMbuszi0809
01/09/2021, 2:50 PMheight = Dimension.fillToConstraints
Inside the ConstrainScope lambda.Dominaezzz
01/09/2021, 3:00 PMBino
07/16/2021, 7:31 AM