Fixed
Status Update
Comments
lp...@google.com <lp...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Louis Pullen-Freilich <
Link:
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
Expand for full commit details
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
These APIs allow overscroll to have events dispatched to it by one component, and rendered in a separate component.
Fixes: b/266550551
Fixes: b/204650733
Fixes: b/255554340
Fixes: b/229537244
Test: OverscrollTest
Relnote: "Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling APIs - these APIs create a wrapped instance of the provided overscroll effect that doesn't draw / handle events respectively, which allows for rendering overscroll in a separate component from the component that is dispatching events. For example, disabling drawing the overscroll inside a lazy list, and then drawing the overscroll separately on top / elsewhere."
Change-Id: Idbb3d91546b49c1987a041f959bce4b2b09a9f61
Files:
- M
compose/foundation/foundation/api/current.txt
- M
compose/foundation/foundation/api/restricted_current.txt
- M
compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/OverscrollDemo.kt
- M
compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/OverscrollSample.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/OverscrollTest.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Overscroll.kt
Hash: f64e25b7a473c757d080521e7dd97b3f6670f60d
Date: Fri Nov 01 18:43:56 2024
ni...@google.com <ni...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha06
androidx.compose.foundation:foundation-android:1.8.0-alpha06
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha06
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha06
lp...@google.com <lp...@google.com> #4
We can probably do better in the future when we have inset support in Compose directly, but right now this is probably a reasonable enough and consistent approach.
dy...@gmail.com <dy...@gmail.com> #5
WindowInsets support was recently added to the Compose Foundation library (
The reason given by
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 848ce53d1abed50947f472861a040a54033202bc
Author: Matvei Malkov <malkov@google.com>
Date: Thu Aug 04 16:56:35 2022
Add insets build-in support for m3 navigation components and app bars.
This change adds the insets supports to all navigation components, app bars and scaffold in m3. This allows for the out of the box insets support where the only thing developers would care about is the colors of the status bar icons (depending on the light/dark theme) and the transparency of the status and navigation bars. They would require the Window object to do it, so we cannot automate it from within the components.
Test: Added new compose and activity based tests
Fixes: 183161866
Relnote: Build-in support for Top app bars, drawers, navigation bar and rail has been added. This components, when used separately or with Scaffold will automatically handle insets for developers. Note: This change doesn't add automatic handling of status bar icons and transparency of the status and navigation bars. Please, continue to do it manually to ensure the best edge-to-edge experience.
Change-Id: I7e4e67bd1a84d62bd5ab1eddc7dbed8efdb471d1
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/PermanentNavigationDrawerTest.kt
M compose/integration-tests/demos/src/main/java/androidx/compose/integration/demos/DemoActivity.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationBar.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/AppBarScreenshotTest.kt
M compose/material3/material3/integration-tests/material3-catalog/src/main/java/androidx/compose/material3/catalog/library/ui/example/Example.kt
M compose/material3/material3/build.gradle
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/ModalNavigationDrawerTest.kt
A compose/material3/material3/src/desktopMain/kotlin/androidx/compose/material/SafeDrawingInsets.desktop.kt
M compose/material3/material3/api/current.txt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/DismissibleNavigationDrawerTest.kt
M compose/material3/material3/src/androidAndroidTest/AndroidManifest.xml
A compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/MaterialComponentsInsetSupportTest.kt
M compose/material3/material3/integration-tests/material3-catalog/src/main/java/androidx/compose/material3/catalog/library/ui/home/Home.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationRail.kt
M compose/integration-tests/demos/src/main/java/androidx/compose/integration/demos/DemoApp.kt
M compose/material3/material3/integration-tests/material3-catalog/src/main/java/androidx/compose/material3/catalog/library/ui/common/CatalogTopAppBar.kt
M compose/integration-tests/demos/src/main/java/androidx/compose/integration/demos/settings/DecorFitsSystemWindowsSetting.kt
A compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/MaterialWindowInsetsActivity.kt
A compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/SafeDrawingInsets.android.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/NavigationBarTest.kt
M compose/material3/material3/api/public_plus_experimental_current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/AppBar.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationDrawer.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Scaffold.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/NavigationRailTest.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/AppBarTest.kt
A compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SafeDrawingInsets.kt
M compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/ScaffoldSamples.kt
M compose/material3/material3/integration-tests/material3-catalog/src/main/java/androidx/compose/material3/catalog/library/ui/component/Component.kt
https://android-review.googlesource.com/2175346
Branch: androidx-main
commit 848ce53d1abed50947f472861a040a54033202bc
Author: Matvei Malkov <malkov@google.com>
Date: Thu Aug 04 16:56:35 2022
Add insets build-in support for m3 navigation components and app bars.
This change adds the insets supports to all navigation components, app bars and scaffold in m3. This allows for the out of the box insets support where the only thing developers would care about is the colors of the status bar icons (depending on the light/dark theme) and the transparency of the status and navigation bars. They would require the Window object to do it, so we cannot automate it from within the components.
Test: Added new compose and activity based tests
Fixes: 183161866
Relnote: Build-in support for Top app bars, drawers, navigation bar and rail has been added. This components, when used separately or with Scaffold will automatically handle insets for developers. Note: This change doesn't add automatic handling of status bar icons and transparency of the status and navigation bars. Please, continue to do it manually to ensure the best edge-to-edge experience.
Change-Id: I7e4e67bd1a84d62bd5ab1eddc7dbed8efdb471d1
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/PermanentNavigationDrawerTest.kt
M compose/integration-tests/demos/src/main/java/androidx/compose/integration/demos/DemoActivity.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationBar.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/AppBarScreenshotTest.kt
M compose/material3/material3/integration-tests/material3-catalog/src/main/java/androidx/compose/material3/catalog/library/ui/example/Example.kt
M compose/material3/material3/build.gradle
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/ModalNavigationDrawerTest.kt
A compose/material3/material3/src/desktopMain/kotlin/androidx/compose/material/SafeDrawingInsets.desktop.kt
M compose/material3/material3/api/current.txt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/DismissibleNavigationDrawerTest.kt
M compose/material3/material3/src/androidAndroidTest/AndroidManifest.xml
A compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/MaterialComponentsInsetSupportTest.kt
M compose/material3/material3/integration-tests/material3-catalog/src/main/java/androidx/compose/material3/catalog/library/ui/home/Home.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationRail.kt
M compose/integration-tests/demos/src/main/java/androidx/compose/integration/demos/DemoApp.kt
M compose/material3/material3/integration-tests/material3-catalog/src/main/java/androidx/compose/material3/catalog/library/ui/common/CatalogTopAppBar.kt
M compose/integration-tests/demos/src/main/java/androidx/compose/integration/demos/settings/DecorFitsSystemWindowsSetting.kt
A compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/MaterialWindowInsetsActivity.kt
A compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/SafeDrawingInsets.android.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/NavigationBarTest.kt
M compose/material3/material3/api/public_plus_experimental_current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/AppBar.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationDrawer.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Scaffold.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/NavigationRailTest.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/AppBarTest.kt
A compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SafeDrawingInsets.kt
M compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/ScaffoldSamples.kt
M compose/material3/material3/integration-tests/material3-catalog/src/main/java/androidx/compose/material3/catalog/library/ui/component/Component.kt
Description
It would be useful if all
AppBar
composables exposed the contentPadding parameter with a default value. An example use case is applying window insets to anAppBar
(Modifier.padding
doesn't work because it applies to the background as opposed to the inner content).Currently it's only exposed by:
But it's not exposed by the below variation of
TopAppBar
, which usesAppBarDefaults.ContentPadding
directly:Please expose it as a parameter with a default value, eg.