Skip to content

Instantly share code, notes, and snippets.

View marcelpallares's full-sized avatar

Marcel marcelpallares

View GitHub Profile
@petedoyle
petedoyle / EdgeToEdge.kt
Last active March 10, 2022 09:59
Kotlin extension functions to simplify edge-to-edge on Android Q
/**
* Applies window transformation flags (WTFs) to aid in supporting
* edge-to-edge layouts on Android Q and higher.
*/
fun Activity?.applyEdgeToEdge(
lightStatusBar: Boolean = false,
lightNavigationBar: Boolean = false,
transparentStatusBar: Boolean = true,
immersive: Boolean = false
) {