레퍼런스 : https://show-me-the-money.tistory.com/entry/Android-FullScreen을-Kotlin으로-구현하는-꿀팁 → 적용 안됨.,..
공식문서 : https://developer.android.com/develop/ui/views/layout/edge-to-edge?hl=ko
과거
private fun setFullScreen(){
window.apply {
statusBarColor = Color.TRANSPARENT
decorView.systemUiVisibility =
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
}
}
현재
https://www.youtube.com/watch?v=9I1tP-5ZMSw
레퍼런스 : https://velog.io/@hyemdooly/enableEdgeToEdge-내부-코드-알고-쓰기
private fun initEventObserve(){
repeatOnStarted {
viewModel.event.collect{
when(it){
is MainEvent.FullScreenMode -> {
enableEdgeToEdge()
}
is MainEvent.NotFullScreenMode -> {
WindowCompat.setDecorFitsSystemWindows(window, true)
}
}
}
}
}