Skip to content Skip to sidebar Skip to footer

How Can I Control Heights In Jetpack Compose Exandable Tabs

PROBLEM: I am working with a vertical list of tabs where one tab is always open A container contains the list and under the container there is a button When a tab is open the conte

Solution 1:

Just add weights to the Columns.

Like so,

Card(
    shape = RoundedCornerShape(32.dp),
) {
    Column(
        Modifier
            .clickable {
                selectedItem = 0
            }
            .fillMaxWidth()
            .background(MoroPurple)
            .padding(10.dp),
    ) {
        Text("BASE INFORMATION", style = MaterialTheme.typography.h1)
        AnimatedVisibility(
            visible = 0 == selectedItem,
        ) {
            Column(
                modifier = Modifier.weight(1f),
            ) { //This right here, you should be good to go after this//content ...
            }
        }
    }
}

Post a Comment for "How Can I Control Heights In Jetpack Compose Exandable Tabs"