總結(jié)一下UI的開(kāi)發(fā)
參考:https://blog.csdn.net/qq_34681580/article/details/103955191
https://blog.csdn.net/guolin_blog/article/details/51763825
一.沉浸式狀態(tài)欄怎么實(shí)現(xiàn)?
直接通過(guò)設(shè)置狀態(tài)欄顏色實(shí)現(xiàn)
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
window.statusBarColor = statusBarColor
二.沉浸式狀態(tài)欄怎么讓背景圖頂上去?
需要設(shè)置decorView.systemUiVisibility的值包含View.SYSTEM_UI_FLAG_FULLSCREEN即可,另外布局xml不能設(shè)置android:fitsSystemWindows為true