// kotlin
Insetter.builder()
// This will apply the navigation + status bar insets as padding to
// all sides of the view
.padding(windowInsetTypesOf(navigationBars = true, statusBars = true))
// There's also paddingLeft(), paddingTop(), etc for specific sides
// This will apply the navigation bar insets as bottom margin on the view
.marginBottom(windowInsetTypesOf(navigationBars = true))
// Similarly, there's also margin(), marginLeft(), etc
// Applies this to the view
.applyToView(view)
// java
Insetter.builder()
// This will apply the navigation + status bar insets as padding to
// all sides of the view.
.padding(WindowInsetsCompat.Type.navigationBars()
| WindowInsetsCompat.Type.statusBars())
// There's also paddingLeft(), paddingTop(), etc for specific sides
// This will apply the navigation bar insets as bottom margin on the view
.marginBottom(WindowInsetsCompat.Type.navigationBars())
// Similarly, there's also margin(), marginLeft(), etc
// Applies this to the view
.applyToView(view);
Breaking changes
DBX: app:consumeSystemWindowInsets has been renamed to app:consumeWindowInsets
Widgets: app:consumeSystemWindowInsets has been renamed to app:consumeWindowInsets
The new API:
Breaking changes
app:consumeSystemWindowInsets
has been renamed toapp:consumeWindowInsets
app:consumeSystemWindowInsets
has been renamed toapp:consumeWindowInsets