我想更改状态栏颜色。我在 App.kt 文件 MaterialTheme{ 中尝试了一些代码 } 但不影响状态栏颜色。
我想更改状态栏颜色,例如登录屏幕的背景。并确保它也不会影响 ios。我尝试了edgeToedge()。但它隐藏了状态栏。我不想隐藏状态栏。只是想改变浅色模式或深色模式下的颜色。
我没有太多使用 compose multiplatform,但我会将此行添加到 android Activity
WindowCompat.setDecorFitsSystemWindows(window, false)
这将使您能够完全访问屏幕。然后,对于 Android 设备上的底部导航,您可能需要添加:
Modifier.windowInsetsPadding(WindowInsets.navigationBars),
您将传递给您的主要可组合项。