I am new to Compose. I use the following code:
Card(
modifier = Modifier
.width(100.dp)
.height(100.dp),
shape = RoundedCornerShape(15.dp),
backgroundColor = Color.Gray
)
But for some unknown reason Card
takes up the whole screen and changes its size only if you use required modifiers. fillMaxWidth(0.2f)
doesn't work either. Help, please.
Only requiredHeight
and requiredWidth
work. The rest of the menus are fine