The container color that I am passing is not wrapping the title of MediumTopAppBar

29 views Asked by At

Here's what it looks like:

screenshot

Scaffold(

        topBar = {
            MediumTopAppBar(
                colors = TopAppBarDefaults.mediumTopAppBarColors(
                    containerColor = Color.Yellow
                ),
                // modifier = Modifier.fillMaxHeight(),
                title = { Text(text = "Expense")}

            )
        },

        content = { innerPadding ->

            Column(modifier = Modifier.padding(innerPadding)) {
                Text(text = "Expenses")
            }

        }

    )

Even the fillMaxHeight wasnt able to alter the height of the container color that is shown in the image.

1

There are 1 answers

0
BenjyTec On BEST ANSWER

There was a bug described on the Google Issue Tracker. It should be resolved in recent versions of the material3 dependency. Please update your dependency to the latest stable release:

implementation "androidx.compose.material3:material3:1.2.1"

Let me know if that resolves the issue.