Skip to content

Instantly share code, notes, and snippets.

@hiking93
Last active March 16, 2022 08:40
Show Gist options
  • Save hiking93/e02810e643cfa0c295a62c325f764c10 to your computer and use it in GitHub Desktop.
Save hiking93/e02810e643cfa0c295a62c325f764c10 to your computer and use it in GitHub Desktop.
Setting decor to fit system windows.
class EdgeToEdgeActivity : ViewBindingActivity<ActivityMainBinding>() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setupWindow()
}
private fun setupWindow() {
WindowCompat.setDecorFitsSystemWindows(window, false)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment