Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
as...@google.com <as...@google.com> #2
Status is still Assigned, but Compose 1.1.0 was already released. Did the ETA change for this feature?
br...@monzo.com <br...@monzo.com> #3
The Compose Animation APIs Navigation needs (such as AnimatedContent
) are still @Experimental
in Compose 1.1.0.
as...@google.com <as...@google.com> #4
Update: Same case for Compose 1.2.0
br...@monzo.com <br...@monzo.com> #5
why is this taking so long?
br...@monzo.com <br...@monzo.com> #7
AnimatedContent
is, as of today, still experimental and still cannot be used in androidx.navigation
.
As soon as it is stable, we can kick off this work.
na...@google.com <na...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit a3386225c952c42b7c687771ea31642d76f4df66
Author: Clara Fok <clarafok@google.com>
Date: Wed May 10 11:26:59 2023
Add Preview support in animated NavHost
Test: ./gradlew navigation:navigation-compose:cC
Bug: 197140101
Change-Id: I7b017913d96e31785f16eb66534321d05f29b53d
M navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHost.kt
https://android-review.googlesource.com/2584844
Branch: androidx-main
commit a3386225c952c42b7c687771ea31642d76f4df66
Author: Clara Fok <clarafok@google.com>
Date: Wed May 10 11:26:59 2023
Add Preview support in animated NavHost
Test: ./gradlew navigation:navigation-compose:cC
Bug: 197140101
Change-Id: I7b017913d96e31785f16eb66534321d05f29b53d
M navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHost.kt
Description
Jetpack Compose version: I've tested on 1.3.0-alpha01 and 1.2.0-beta03
Jetpack Compose component(s) used: LazyColumn
Android Studio Build: 221.3427.89.2211.8689873
Kotlin version: 1.7.10
Steps to Reproduce or Code Sample to Reproduce:
Context:
We have a rather large (10k+ items) LazyColumn where scrolling (eventually) leads to the application grinding to a halt, constantly trying to free memory. It can't, we just keep getting lots of these:
Background concurrent copying GC freed 51964(1414KB) AllocSpace objects, 6(120KB) LOS objects, 0% free, 190MB/192MB, paused 101us total 1.483s
I took at heap dump at this point and basically all of the heap is used up by instances of
SnapshotMutableStateImpl$StateStateRecord
.Replace LazyColumn with a RecyclerView (with each item being a ComposeView) and the memory leak is gone. App performance is night and day better.
I've been trying for hours to reproduce this in a trivial sample project and haven't had any luck yet. Raising this anyway just in case you have any ideas about what might be causing it. Obviously this makes LazyColumn completely unusable for us, so we'll stick to RecyclerView for now!