I set up status bar color like this:
val systemUiController = rememberSystemUiController()
SideEffect {
systemUiController.setStatusBarColor(
color = Color(0xFFA784FB)
)
}
My top bar
@Composable
fun ProminentTopAppBarWithImage() {
TopAppBar(
modifier = Modifier.height(200.dp),
contentPadding = PaddingValues(all = 0.dp) // (1)
) {
Box(modifier = Modifier.fillMaxSize().background(SaveDoneBackGroundGradient)) { // (2)
Row( // (4)
modifier = Modifier
.fillMaxSize()
.padding(horizontal = 4.dp) // (5)
) {
/*...*/
}
}
}
}
Any solutions for this issue?


I think the only way for a status bar to have and match a gradient color of the content is to resort back to old window/drawable config.
Taken the idea from this post, you'll have to create an xml
drawablethat will match the colors and orientation of your gradient background you use in your composable container/layout.res/drawable/gradient_horizontal.xmland have this window configuration, where you will set the
drawableas the window backgroundand then call it in your activity
You'll get something like this
You'll just have to adjust both the drawable and your background gradient colors/orientation if you want to change everything and maintain a uniform look of your status bar and the content.