Android - 沉浸模式(Immersive Mode)

隱藏back鍵的bar 隱藏status bar

this.window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) // 跟系統表示要渲染 system bar 背景。
window.statusBarColor = Color.TRANSPARENT

其他參考

https://www.jianshu.com/p/11a2b780fd9b

https://www.itread01.com/p/21304.html