Fixed
Status Update
Comments
je...@google.com <je...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 876a747254c3cded59e9ce6101a249fa3efe6b27
Author: Jelle Fresen <jellefresen@google.com>
Date: Fri Jan 15 16:11:27 2021
Early add Popup to window
When creating an AndroidPopup, don't wait until variables necessary to
calculate its position are available before adding the PopupLayout to
the WindowManager, but add it immediately.
To avoid flickering, the popup will be fully transparent while we don't
have all variables yet that are necessary to calculate the popup's
position.
Bug: 175765614
Test: Ran demos
Change-Id: I5b364106d86d79b2856ef72701f0307542676442
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidPopup.kt
https://android-review.googlesource.com/1552459
Branch: androidx-main
commit 876a747254c3cded59e9ce6101a249fa3efe6b27
Author: Jelle Fresen <jellefresen@google.com>
Date: Fri Jan 15 16:11:27 2021
Early add Popup to window
When creating an AndroidPopup, don't wait until variables necessary to
calculate its position are available before adding the PopupLayout to
the WindowManager, but add it immediately.
To avoid flickering, the popup will be fully transparent while we don't
have all variables yet that are necessary to calculate the popup's
position.
Bug: 175765614
Test: Ran demos
Change-Id: I5b364106d86d79b2856ef72701f0307542676442
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidPopup.kt
pa...@google.com <pa...@google.com> #3
Can we close this one as fixed? :)
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit f7b086081a0656197e39d436b88f534e9adc14fc
Author: Jelle Fresen <jellefresen@google.com>
Date: Thu Jan 14 11:22:30 2021
Wait while Views are added to the WindowManager
The test harness will now consider the app non-idle when the view
hierarchy of a Compose root is in the process of being added to the
WindowManager.
Fixes: 175765614
Test: Added WaitingForPopupTest
Relnote: "Tests in which Compose is used in hierarchies that are
added/removed directly to the WindowManager are now more stable."
Change-Id: Ie81ed2a14d183b3d5cab594302e86261c8db2379
M compose/ui/ui-test-junit4/api/current.txt
M compose/ui/ui-test-junit4/api/public_plus_experimental_current.txt
M compose/ui/ui-test-junit4/api/restricted_current.txt
M compose/ui/ui-test-junit4/src/androidAndroidTest/kotlin/androidx/compose/ui/test/junit4/ComposeRootRegistryTest.kt
M compose/ui/ui-test-junit4/src/androidAndroidTest/kotlin/androidx/compose/ui/test/junit4/MultipleActivitiesClickTest.kt
A compose/ui/ui-test-junit4/src/androidAndroidTest/kotlin/androidx/compose/ui/test/junit4/WaitingForPopupTest.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/android/ComposeIdlingResource.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/android/ComposeIdlingResourceNew.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/android/ComposeRootRegistry.kt
https://android-review.googlesource.com/1550004
Branch: androidx-main
commit f7b086081a0656197e39d436b88f534e9adc14fc
Author: Jelle Fresen <jellefresen@google.com>
Date: Thu Jan 14 11:22:30 2021
Wait while Views are added to the WindowManager
The test harness will now consider the app non-idle when the view
hierarchy of a Compose root is in the process of being added to the
WindowManager.
Fixes: 175765614
Test: Added WaitingForPopupTest
Relnote: "Tests in which Compose is used in hierarchies that are
added/removed directly to the WindowManager are now more stable."
Change-Id: Ie81ed2a14d183b3d5cab594302e86261c8db2379
M compose/ui/ui-test-junit4/api/current.txt
M compose/ui/ui-test-junit4/api/public_plus_experimental_current.txt
M compose/ui/ui-test-junit4/api/restricted_current.txt
M compose/ui/ui-test-junit4/src/androidAndroidTest/kotlin/androidx/compose/ui/test/junit4/ComposeRootRegistryTest.kt
M compose/ui/ui-test-junit4/src/androidAndroidTest/kotlin/androidx/compose/ui/test/junit4/MultipleActivitiesClickTest.kt
A compose/ui/ui-test-junit4/src/androidAndroidTest/kotlin/androidx/compose/ui/test/junit4/WaitingForPopupTest.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/android/ComposeIdlingResource.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/android/ComposeIdlingResourceNew.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/android/ComposeRootRegistry.kt
Description
In the more general case, we should probably be aware of anything that is scheduled to be added to the window but not yet attached, for a reasonable definition of "scheduled".
Potentially this information can be surfaced through ViewRootForTest?