[英]How to get Scaffold to Appear Over Top Notification Bar in Jetpack Compose?
我希望我的腳手架出現在通知欄的頂部,這可能嗎?
這就是我所擁有的(由於公司政策,不能顯示太多):
我想要腳手架到 go 隨着時間和電池符號。
這就是我要的:
上圖來自 Google Developers 文檔站點: https://developer.android.com/jetpack/compose/layouts/material#modal-drawers
我的代碼:
Scaffold(
scaffoldState = scaffoldState,
topBar = {
TopBarComposable() // Where you see the Edit button is bottom right
},
drawerContent = {
DrawerContentComposable()
},
content = {
ContentComposable() // The main screen thats under the Top Bar Composable
},
bottomBar = { BottomBarComposable() },
drawerShape = RectangleShape
)
任何幫助將不勝感激!
使用WindowCompat.setDecorFitsSystemWindows
// Turn off the decor fitting system windows, which allows us to handle insets, including IME animations
WindowCompat.setDecorFitsSystemWindows(window, false)
來源:現在在 Android
有關詳細信息,請參閱此處。
請注意,您還必須手動處理填充。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.