Created
July 15, 2021 15:36
-
-
Save DaChelimo/29fe1607d2f5ea53bade35212972a07f to your computer and use it in GitHub Desktop.
A list of utility functions relating with the Android System UI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun setupEdgeToEdgeUI() { | |
WindowCompat.setDecorFitsSystemWindows(window, false) | |
ViewCompat.setOnApplyWindowInsetsListener(binding.overlayView) { v, insets -> | |
insets.getInsets(WindowInsetsCompat.Type.systemBars()).let { v.setPadding(it.left, it.top, it.right, it.bottom) } | |
WindowInsetsCompat.CONSUMED | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment