chrisbanes / insetter

Insetter is a library to help apps handle WindowInsets more easily
https://chrisbanes.github.io/insetter
Apache License 2.0
1.13k stars 42 forks source link

New Kotlin DSL #92

Closed chrisbanes closed 3 years ago

chrisbanes commented 3 years ago

Example:

view.applyInsetter {
    // Apply the navigation bar insets as padding
    type(navigationBars = true) {
        padding()
    }
    // Apply the status bar insets as margin
    type(statusBars = true) {
        margin()
    }
}