Status Update
Comments
ma...@google.com <ma...@google.com>
so...@google.com <so...@google.com> #2
Note to self: the ListView
implementation does this as well, let's start there to see how this can be achieved.
ez...@gmail.com <ez...@gmail.com> #3
I think I just ran into this as well. I've got a loop that runs some code in a withFrameNanos
block, and then runs some code after it before the next iteration. That "after" code relies on layout invalidated by the withFrameNanos
block having been performed by the time it runs. This works perfectly in a real app, but in UI tests the loop runs to completion without layout being performed until the end. I almost want a awaitLayout()
function to make this dependency more explicit, although I think fixing this issue in tests should be enough. (More discussion in
so...@google.com <so...@google.com> #4
One blocker for this is that currently the test infra uses an unconfined coroutine dispatcher, which makes it hard to ensure the ordering between withFrameNanos
calls and the resumption of the coroutines making them are ordered correctly. We might need to get off unconfined test dispatchers first:
ch...@google.com <ch...@google.com> #5
po...@google.com <po...@google.com>
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit 98f2641f492c7ffc91e77e39d60b77909669f0ea
Author: Zach Klippenstein <klippenstein@google.com>
Date: Wed Nov 09 16:48:00 2022
Send apply notifications after Recomposer finishes frame.
This fixes a bug where updating the intrinsics changes would be delayed
a frame. Changes to the intrinsics measure policy in a
layout node during apply changes was not applied until _after_ the
layout pass, which might result in not invalidating layout that should
have been that frame. And since those changes would only be applied for
the next frame, it would invalidate that frame unnecessarily. In other
words, intrinsics changes would be delayed a frame.
This is a prerequisite for
Test: RemeasureWithIntrinsicsRealClockTest (the current test does not
catch this bug because of
Test: RecomposerTests
Relnote: "Snapshot apply notifications are now sent after the
`Recomposer` finishes applying changes."
Change-Id: Iad6c0dcd163a5a8f9c5aec426da3d4f701ca509f
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Recomposer.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/CompositionTests.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/EffectsTests.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/RecomposerTests.kt
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/layout/RemeasureWithIntrinsicsRealClockTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/layout/RemeasureWithIntrinsicsTest.kt
Description
Build: AI-202.7319.50.42.6863838, 202009251539,
AI-202.7319.50.42.6863838, JRE 11.0.8+10-b944.6842174x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080, 1920x1080
AS: 4.2 Canary 13; Kotlin plugin: 1.4.10-release-Studio4.2-1; Android Gradle Plugin: 4.2.0-alpha13; Gradle: 6.7; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply all required information.
Compose Version : 1.0.0-alpha05
I'm building an app that's all RTL. I have an Alert Dialog in it, but the text inside the dialog isn't following RTL. I tried changing the alignment of the text, wrapping the Alert Dialog inside an RTL provider, wrapping the text inside an RTL provider, but nothing works.
Is something wrong with the component? Or is tehre something I'm not doing?