Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit f48698b0f7d791cb705ac7b8c227102c93251a63
Author: George Mount <mount@google.com>
Date: Tue Feb 08 10:18:26 2022
Add "only()" WindowInsets method.
Fixes: 217768486
Relnote: "Add WindowInsets.only() method to allow developers
to include only dimensions from the WindowInsets."
Test: New tests
Change-Id: I14c94c017d0b7a31f5fc3248f478d5331332d18f
M compose/foundation/foundation-layout/api/restricted_current.txt
A compose/foundation/foundation-layout/src/test/kotlin/androidx/compose/foundation/layout/WindowInsetsTest.kt
M compose/foundation/foundation-layout/api/public_plus_experimental_current.txt
M compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/WindowInsets.kt
M compose/foundation/foundation-layout/api/current.txt
M compose/foundation/foundation-layout/build.gradle
https://android-review.googlesource.com/1976928
Branch: androidx-main
commit f48698b0f7d791cb705ac7b8c227102c93251a63
Author: George Mount <mount@google.com>
Date: Tue Feb 08 10:18:26 2022
Add "only()" WindowInsets method.
Fixes: 217768486
Relnote: "Add WindowInsets.only() method to allow developers
to include only dimensions from the WindowInsets."
Test: New tests
Change-Id: I14c94c017d0b7a31f5fc3248f478d5331332d18f
M compose/foundation/foundation-layout/api/restricted_current.txt
A compose/foundation/foundation-layout/src/test/kotlin/androidx/compose/foundation/layout/WindowInsetsTest.kt
M compose/foundation/foundation-layout/api/public_plus_experimental_current.txt
M compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/WindowInsets.kt
M compose/foundation/foundation-layout/api/current.txt
M compose/foundation/foundation-layout/build.gradle
Description
All of the padding
Modifier
s current apply the entire insets of that type, which might not be desired.For example, it's useful to apply the
systemBars
to the padding of a top app bar, but only the top, start and end.In
accompanist/insets
, this was possible withModifier.systemBarsPadding(bottom = false)
In the
androidx.insets
, the equivalent is possible, but much more verbose: