Fixed
Status Update
Comments
ma...@google.com <ma...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Leland Richardson <
Link:
Add onRectChanged modifier and corresponding callback support to rect tracking
Expand for full commit details
Add onRectChanged modifier and corresponding callback support to rect tracking
Fixes: 372765423
Fixes: 372757007
Fixes: 372994338
Relnote:"""
Added Modifier.onRectChanged API which is an API that allows one to subscribe to the root/window/screen-relative position and size of a
LayoutNode. The API solves many use cases that the existing onGloballyPositioned modifier does, however it does so with much less
overhead and the API comes with facilities to debounce and throttle the callback per what one's use case demands.
"""
Change-Id: Id28c7c6c52ce3b18c9ac8c83cde48111a312cfc9
Files:
- M
compose/ui/ui/api/current.txt
- M
compose/ui/ui/api/restricted_current.txt
- A
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/layout/OnGlobalRectChangedTest.kt
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/layout/OnGloballyPositionedTest.kt
- A
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/Actual.android.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
- M
compose/ui/ui/src/androidUnitTest/kotlin/androidx/compose/ui/spatial/RectListTest.kt
- A
compose/ui/ui/src/androidUnitTest/kotlin/androidx/compose/ui/spatial/ThrottledCallbacksTest.kt
- M
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/Expect.kt
- A
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/OnRectChangedModifier.kt
- M
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/MeasureAndLayoutDelegate.kt
- A
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/spatial/RectInfo.kt
- M
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/spatial/RectList.kt
- M
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/spatial/RectManager.kt
- A
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/spatial/ThrottledCallbacks.kt
- M
compose/ui/ui/src/commonStubsMain/kotlin/androidx/compose/ui/Actual.commonStubs.kt
Hash: ce33454f34929182e1109f6254144d390f27e7c8
Date: Wed Oct 16 13:18:34 2024
sg...@google.com <sg...@google.com>
ap...@google.com <ap...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui:1.8.0-alpha05
androidx.compose.ui:ui-android:1.8.0-alpha05
androidx.compose.ui:ui-jvmstubs:1.8.0-alpha05
androidx.compose.ui:ui-linuxx64stubs:1.8.0-alpha05
sg...@google.com <sg...@google.com> #4
The fix above should take care of this issue.
Description
Jetpack Compose version: 1.5.1 (androidx.compose:compose-bom:2023.09.00)
Jetpack Compose component used: androidx.compose.material3:material3:1.2.0-alpha07
Android Studio Build: Android Studio Giraffe | 2022.3.1 Patch 1
Kotlin version: 1.9.10
If you place DropdownMenu inside title of TopAppBar and there is a composable with fillMaxHeight Modifier, then the DropdownMenu will not be placed under the TopAppBar, but under the center of the Scaffold content. The workaround is to use height(64.dp) Modifier instead of fillMaxHeight().
Code sample:
Also you can download the sample project.