This repository was archived by the owner on Sep 30, 2024. It is now read-only.
v0.5.0
馃啎 WindowInsets.Type support
Insetter now fully supports the new recent API improvements to WindowInsets. We use the backported functionality available in AndroidX Core 1.5.0-beta01 which allows it to work back to API 21:
Insetter.builder()
.padding(windowInsetTypesOf(navigationBars = true))
.margin(windowInsetTypesOf(statusBars = true))
.applyToView(view)馃摉 See here for more information.
All of the old inset type functions (applySystemWindowInsetsToPadding(), etc) have been deprecated.
馃啎 DSL for Kotlin users
We now have a new DSL for Kotlin users:
view.applyInsetter {
// Apply the navigation bar insets...
type(navigationBars = true) {
// Add to padding on all sides
padding()
}
// Apply the status bar insets...
type(statusBars = true) {
// Add to margin on all sides
margin()
}
}馃摉 See here for more information.
All changes
- Tidy up the Side class (#95) @chrisbanes
- Update dependencies (#96) @chrisbanes
- Improve the docs + website (#94) @chrisbanes
- New Kotlin DSL (#92) @chrisbanes
- Apply insets on every attach (#91) @alexvanyo
- Allo user to choose if he wants to consume insets wen using setOnApplyInsetsListener (#89) @SamYStudiO
- Support for the Android 11 WindowInsets types (#86) @chrisbanes
馃憦 Thanks to all of the contributors above!