Open nilsi opened 1 year ago
It seems like the behavior has to do with the TopAppBar.
if the scroll distance to bottom is smaller than appbar height it will end up scrolled one appbar height from bottom.
This is due to the navigation changes before the transition is done. So the appbar hides and pushes the scroll up I think.
I solved this in our app by removing the top level app bar and having one app bar per screen instead of the top level destinations. So there are no hiding/showing app bars anymore.
this issue is still actual and will be the same when showing/hiding bottom bar between switching screens - https://stackoverflow.com/questions/76284055/how-to-correctly-use-bottombar-navigationbar-for-top-level-destination-screens
any news?
@nilsi topBar can be used separately for each screen but not a bottomBar - it will destroy navigation animations (it should stay static for screens which have bottom bar) such as horizontal sliding during changing screens. Also bottomBar should not be used in each feature separately because such features should not know about other features.
that's why bottomBar should stay in top level composable anyway but how to fix the animations and scroll in this - it's a mystery.
I have found the problem but don't know the solution. // full screen WindowCompat.setDecorFitsSystemWindows(window, false) It seems to be causing the issue. If you have a solution, please let me know.
I solved this in our app by removing the top level app bar and having one app bar per screen instead of the top level destinations. So there are no hiding/showing app bars anymore.
This is probably what you have to do @Chung-Chase52
Thank you for your response. However, I do not use TopAppBar, and after several tests, I found that downgrading the material3 version to 1.1.0-rc01 resolved the issue. Could this be a bug? @nilsi
Is there an existing issue for this?
Is there a StackOverflow question about this issue?
What happened?
After navigating to another page and then hitting back the UI scrolls up a bit.
This only happens when the list is scrolled all the way to the bottom. Any ideas why this happens?
Its on an Samsung S22 Ultra running Android 13.
https://github.com/android/nowinandroid/assets/793881/1f9fe6e1-9b18-49a3-bd59-980624c7d82b
Relevant logcat output
No response
Code of Conduct