Fixed
Status Update
Comments
gg...@google.com <gg...@google.com> #2
We are Facing this same issue after updating to compose 1.3.0 and also only on Android 9 Devices.
ra...@gmail.com <ra...@gmail.com> #3
Note: Some of the latest comments from b/212982463 could be relevant to this issue
gg...@google.com <gg...@google.com> #4
Hi, Is there any update on this. Any temp workaround would be helpful as well. Currently we have 10s of thousand users per day getting affected by this.
gg...@google.com <gg...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit e3164fbf4137f9cf60da424aef4b1d9ea5202b6c
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Thu Dec 15 18:00:23 2022
Make our fake Views we use as graphic layer to save nothing as the View's saved instance state.
Because the Views were attached to the hierarchy and had an id their state was saved polluting the state Activity saves in Bundle. Such views have no real state as they are not used as real views.
Test: ComposeViewSavedStateSizeTest
Bug: 260322832
Change-Id: I0b755a3d6a164b6c26aa592e13e206dc45cd5dd9
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/ComposeViewSavedStateSizeTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayer.android.kt
https://android-review.googlesource.com/2359699
Branch: androidx-main
commit e3164fbf4137f9cf60da424aef4b1d9ea5202b6c
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Thu Dec 15 18:00:23 2022
Make our fake Views we use as graphic layer to save nothing as the View's saved instance state.
Because the Views were attached to the hierarchy and had an id their state was saved polluting the state Activity saves in Bundle. Such views have no real state as they are not used as real views.
Test: ComposeViewSavedStateSizeTest
Bug: 260322832
Change-Id: I0b755a3d6a164b6c26aa592e13e206dc45cd5dd9
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/ComposeViewSavedStateSizeTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayer.android.kt
ni...@gmail.com <ni...@gmail.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 326b394002e0f899fdc0bffc622761bc67bca21b
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Thu Dec 15 16:16:31 2022
Destroy layers added on the nodes when the node is removed
Currently the layer objects are not being removed from the AndroidComposeView in this situation, which means we are not reusing the layers and we keep them attached until the whole AndroidComposeView is not garbage collected.
Test: new test in MeasureAndLayoutDelegateTest
Bug: 260322832
Change-Id: Iaeee5662b4646230cebdafd2484c691df657edda
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/layout/Helpers.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/layout/MeasureAndLayoutDelegateTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/NodeCoordinator.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/NodeKind.kt
https://android-review.googlesource.com/2359119
Branch: androidx-main
commit 326b394002e0f899fdc0bffc622761bc67bca21b
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Thu Dec 15 16:16:31 2022
Destroy layers added on the nodes when the node is removed
Currently the layer objects are not being removed from the AndroidComposeView in this situation, which means we are not reusing the layers and we keep them attached until the whole AndroidComposeView is not garbage collected.
Test: new test in MeasureAndLayoutDelegateTest
Bug: 260322832
Change-Id: Iaeee5662b4646230cebdafd2484c691df657edda
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/layout/Helpers.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/layout/MeasureAndLayoutDelegateTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/NodeCoordinator.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/NodeKind.kt
dy...@gmail.com <dy...@gmail.com> #7
Great. Thank you very much for fixing this. Really appreciate the quick response. Could you share which version this fix will be released?
dy...@gmail.com <dy...@gmail.com> #8
Hi there! Most likely next release of Compose UI, by mid January. Cheers.
[Deleted User] <[Deleted User]> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui:1.3.3
androidx.compose.ui:ui:1.4.0-alpha04
co...@gmail.com <co...@gmail.com> #10
Issue is still existing with the same rate in 1.3.3 and similar reproduction steps. Since this ticket is already set as fixed, should we file a new bug?
ma...@gmail.com <ma...@gmail.com> #11
Hey. Please check that you can reproduce the same issue with the latest 1.4 release and if yes please file a new bug. Thanks
ma...@gmail.com <ma...@gmail.com> #12
https://issuetracker.google.com/72798625#attachment62278513
ma...@gmail.com <ma...@gmail.com> #13
https://issuetracker.google.com/72798625#attachment62278513
Description
Version used: 3.0.1
What steps will reproduce the problem?
1. Put an AppCompatTextView in your UI with android:textAllCaps="true" and android:text="Low Stock" in your XML (I'm using android:id="@+id/lowStockTV")
2. Launch your activity through a Test. AppCompatTextView will be shown as "LOW STOCK"
3. Check that that view has text with Espresso in the following way:
onView(withId(R.id.lowStockTV))
.check(
matches(withText("LOW STOCK"))
)
How are you running your tests (via Android Studio, Gradle, adb, etc.)? Android Studio
What is the expected output?
The expected output is obtaining a valid ViewInteraction with no throw (AssertionFailedWithCausedError)
What do you see instead?
AssertionFailedWithCausedError with message:
'with text: is "LOW STOCK"' doesn't match the selected view.
Expected: with text: is "LOW STOCK"
Got: "AppCompatTextView{id=2131296406, res-name=lowStockTV, visibility=VISIBLE, width=1002, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@5155c10, tag=null, root-is-layout-requested=false, has-input-connection=false, x=39.0, y=39.0, text=Low Stock, input-type=0, ime-target=false, has-links=false}"
if I use:
onView(withId(R.id.lowStockTV))
.check(
matches(withText("Low Stock"))
)
it works perfectly, I get my ViewInteraction, but that's not why I see in my UI