Status Update
Comments
va...@google.com <va...@google.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.
ci...@google.com <ci...@google.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
.
va...@google.com <va...@google.com> #4
Are you testing on a debug or a release version of your APK?
ap...@google.com <ap...@google.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.
va...@google.com <va...@google.com>
pr...@google.com <pr...@google.com> #6
Could you provide us with a minimal code that showcase this issue. It can be very helpful!
Description
Jetpack Compose version:
Material Library Version (M2, M3 or Both?):
Material Compose component used:
androidx.compose.material3.Scaffold
Steps to Reproduce:
MainActivity.kt
, (a)enableEdgeToEdge
is called and (b)Scaffold's PaddingValues
(calledinnerPadding
here) is applied to the entire content.See attached image (
Scaffold_DisplayCutout.png
). I've modified the sample code to make the issue more apparent. Notice the Composable, which is usinginnerPadding
, avoids the system bars region but does not avoid the display cutout region.Severity: To ensure Scaffold's edge-to-edge is enforced in Android 15.
PaddingValues
makes going edge-to-edge easy, it should account for display cutouts. Otherwise, developers shouldn't use Scaffold'sPaddingValues
and should instead use alternatives likeWindowInsets.safeDrawing
,WindowInsets.safeGestures
, orWindowInsets.safeContent
. This is especially important as