HI everyone .. on android i have some performance ...
# compose-ios
a
HI everyone .. on android i have some performance issue with compose multiplatform .. when I wrapped a fullsize LazyColumn with a box .. then add a button with an image on it as a sibling and on top of the LazyColumn .. the lazy column seems Laggy and stuttering .. i also test it on release apk and still having same issue when i remove the Button it seems fine
i
JetBrains does not publish any Android artifact for Compose Multiplatform - it's just Google's Jetpack Compose. So, I'd suggest you to post this android-specific question to #compose channel that monitored by Google folks
a
even when im using compose multiplatform ?
i
yes, on Android it's still original Jetpack Compose
c
@Ivan Matkov I think not. Icons and Text doesn’t show up if you don’t specify a color. It should be black at least
l
They will if you have set up the material theme correctly. Did you try the compose multiplatform starter?
i
@Cherrio LLC sorry I don't get how your message is related to this android performance problem
a
@Ivan Matkov do you want a sample code ?
c
@Ivan Matkov I’m just trying to say something is broken.
i
Do you observe some deference here between android only compose app and compose multiplatform app on android?
a
@Ivan Matkov wait im gonna try to build it on android only compose
im just migrating from android only to compose
@Ivan Matkov sorry for bothering you .. im so stupid at this .. the issue is im not saving the state of button visibility into a remember mutable state of .. and directly make a condition in AnimatedVisibility(isVisible = {condition}) .. now i move the state into remember
Copy code
val isTapToTopButtonVisible by remember(surveyListState.firstVisibleItemIndex > 0){
            mutableStateOf(surveyListState.firstVisibleItemIndex > 0)
        }
i
Glad that the issue is solved
a
thanks eveyone
j
You want to use derivedStateOf for liststate otherwise observe and recompise all the time. Or snapshotState. Also you have stickyHeader in Lazy column can use. And remember using unique ids to each row if possible.
a
Okay ill try that .. thank you for suggesting that