Status Update
Comments
ma...@wmg.com <ma...@wmg.com> #2
I have a LazyVerticalGrid composable with around 100 elements (2 columns) and the scroll is already very laggy. With a SmallAppBar and a scrollbehavior, it is now very very laggy.
ma...@wmg.com <ma...@wmg.com> #3
Is this a LazyColumn
/LazyVerticalGrid
performance issue?
We've ported the behavior to material
(not material3
) and whenever LazyColumn
's size and position were being adjusted during a scroll, the scrolling was laggy.
We've also tried to make LazyColumn
fill the whole screen and adjust its contentPadding
instead, but we got the same result. The scrolling was laggy while contentPadding
was being adjusted.
Once the bar is collapsed, the performance seems okay again.
We use ExitUntilCollapsedScrollBehavior
.
ke...@google.com <ke...@google.com>
ap...@google.com <ap...@google.com> #4
Are you testing on a debug or a release version of your APK?
64...@gmail.com <64...@gmail.com> #5
We tried both. It's a bit better in release version but not good enough for production use.
We tested on physical Pixel 3a with API 32.
tj...@fieldwire.com <tj...@fieldwire.com> #6
Could you provide us with a minimal code that showcase this issue. It can be very helpful!
se...@google.com <se...@google.com>
ap...@google.com <ap...@google.com> #7
Might be related to
Will keep this one open for now until the fix is merged and pushed for the next alpha.
se...@google.com <se...@google.com>
le...@gmail.com <le...@gmail.com> #8
Possibly fixed/duplicated by
ri...@td.com <ri...@td.com> #9
Agree. This looks like the issue that Mariano resolved there (we had a missing remember
at the enterAlwaysScrollBehavior()
).
Closing as a duplicate.
The fix should be available at 1.4.0-alpha01
.
Description
Jetpack Compose version: 1.5.9 Jetpack Compose component used: BottomModalSheet Android Studio Build: Hedgehog 2023.1.1 Patch 2 Kotlin version: 1.9.22
Steps to Reproduce or Code Sample to Reproduce:
We have a
ModalBottomSheet
with a stickyTextField
on the bottom. We allow bothPartiallyExpanded
andExpanded
states. Whenever we are in theExpanded
state and focus on theTextField
, the resulting screen resize from the keyboard showing causes theModalBottomSheet
to switch its target state toPartiallyExpanded
.This is a pretty jarring UI experience and ideally we would just stay in the
Expanded
state.I've traced it down to these lines in
ModalBottomSheet.android.kt
that prioritizePartiallyExpanded
whenever the anchors change (via the screen size changing).Here is a sample project and video is included: