Status Update
Comments
ri...@google.com <ri...@google.com> #3
Does this happen if you temporarily remove/disable the pull-refresh part?
se...@google.com <se...@google.com> #4
co...@google.com <co...@google.com>
ri...@google.com <ri...@google.com> #5
co...@google.com <co...@google.com>
se...@google.com <se...@google.com>
ap...@google.com <ap...@google.com> #6
We're facing the same issue with TopAppBar
and TopAppBarDefaults.pinnedScrollBehavior
. When scrolling quickly on a lazy layout, the app bar container color does not respond.
Repo:
Video:
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior()
Scaffold(
modifier = Modifier
.fillMaxSize()
.nestedScroll(scrollBehavior.nestedScrollConnection),
topBar = {
TopAppBar(
title = {
Text(
modifier = Modifier.fillMaxWidth(),
text = "Hello!",
textAlign = TextAlign.Center,
)
},
scrollBehavior = scrollBehavior,
)
},
) { innerPadding ->
LazyColumn(
modifier = Modifier.padding(innerPadding),
contentPadding = PaddingValues(16.dp),
verticalArrangement = Arrangement.spacedBy(8.dp),
) {
items(100) {
Text(
text = "Item $it",
modifier = Modifier
.fillMaxWidth()
.background(MaterialTheme.colorScheme.surfaceContainerHigh)
.padding(24.dp),
)
}
}
}
se...@google.com <se...@google.com>
ju...@google.com <ju...@google.com> #7
I am facing the same bug and i think the root case for it is that the PinnedScrollBehavior
doesn't override the onPostFling
in its NestedScrollConnection
implementation.
I made a crude simple custom version and added
override suspend fun onPostFling(consumed: Velocity, available: Velocity): Velocity {
if (available.y > Velocity.Zero.y)
state.contentOffset = 0f
return super.onPostFling(consumed, available)
}
and then it works fine for me!
pr...@google.com <pr...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
Author: Shalom Gibly <
Link:
Fix the app-bars behaviors to detect end of scroll
Expand for full commit details
Fix the app-bars behaviors to detect end of scroll
Apply a fix to all the behaviors to detect the end of scroll in the post
fling function. This will better ensure an app-bar color change when the
content is scrolled all the way.
Bug: 293665988
Test: Manual
Relnote: "Fix the top and bottom app-bar behaviors to reliably change
color when content is scrolled all the way."
Change-Id: Idc4e834695cbd7cb8099f7b63cf21d5b764f1c81
Files:
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/AppBar.kt
Hash: 792c8cdf7db425c674de1214e60c7d01f46e9750
Date: Mon Nov 25 06:03:57 2024
di...@zillowgroup.com <di...@zillowgroup.com> #9
When I try to replace the default windowInsets value with something like WindowInsets.navigationBars, it doesn't help because the values are zero at the time of calling ModalBottomSheet(). Placing a hard-coded bottom padding value in the windowInsets object does have an effect when the bottom sheet is expanded, but I can't figure out how to determine the correct padding value since the WindowInsets.navigationBars values are zero.
Specifically, I am experiencing the issue when using Compose BOM 2023.06.01, but not with 2023.05.01.
ar...@gmail.com <ar...@gmail.com> #10
On affected systems the ModalBottomSheet is always aligned to the bottom of the screen.
We see this on Android <= 10 (you can easily see this on an Android 10 emulator, while the Android 13 emulator works).
However, some users report this for Android 13 (only three reports, yet).
I guess it doesn't bother many Android 13 users (most of our users have it), because I think the default is gesture navigation, and while you can see that it overlaps, it doesn't hurt much.
At least with 3-button navigation, you have a hard time to touch the application buttons behind the navigation buttons.
id...@trivago.com <id...@trivago.com> #11
hu...@gmail.com <hu...@gmail.com> #12
Facing the same issue. ModalBottomSheet does not allow the sheet content to be padded rather it places the sheet dialog on top of navigation bars. This way if the sheet container has a background color there's an obvious white line equal to navigation bar inset. Supplying WindowInsets(0,0,0,0) to cancel out bottom paddings & trying to pad content manually doesn't work since within the content navigation insets are returned 0.
ex...@isn.com <ex...@isn.com> #13
I’m experiencing the same issue with ModalBottomSheet
when using material3
B.O.M 2023.06.01
(v1.1.1). This problem does not occur with B.O.M 2023.05.01
(v1.1.0).
Things I Tried (No Luck):
- No modifiers: Used only the default
BottomSheetDefaults.windowInsets
. - Applied the
.safeDrawingPadding()
modifier. - Applied the
.statusBarsPadding()
modifier.
Observations (Screenshots Below):
- #1: The BottomSheet is
edgeToEdge
, covering the status bar content. - #2: Adds way too much padding—more than what’s necessary.
- #3: Adds extra padding, but slightly less than #2.
Temporary Solution:
For now, I’ve downgraded back to B.O.M 2023.05.01
, hopefully, newer versions of material3
(v1.1.1+) will resolve this issue, however, updating to the most recent ones (1.3+) requires tackling significant tech debt.
Description
After looking through all components that support Insets,
ModalBottomSheet
doesn't expose the option to change theWindowInset
that it applies. This goes against the other components that use insets.All the other components (
TopAppBar
,BottomAppBar
etc), expose awindowInsets
parameter. Any component that consumes a window inset, should allow for this to be changed as not everyone is using insets in the exact same standard way.