-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fragment transaction breaks layout if exitUntilCollapsed flag is set #1019
Comments
Same problem here, did you manage to find a fix for it? |
@lvcmenezes nope, and I wonder how does world live with that without any complain. |
@lvcmenezes looks like I found a workaround, not sure though if it works in all circumstances:
|
@chrisbanes could be this issue related the issue you've fixed with #299 ? |
I have almost the same issue. I have tried version 1.1.0, and 1.2.0-alpha06 See video:
PS: since the 1st view (the fragment) is part of a Navigation (with NavHostFragment and BottomNavigationView) ... sometimes the other fragments have 0 width and height (so a blank page.. although the api calls work, recyclers are populated, etc) |
Fixed by a21a300 |
I don't believe this issue has been fixed yet. I am using the layout below:
and let's say the toolbar is in collapsed state, and user has scrolled somewhere in the list, taps a list item and navigates to another fragment. Hitting back, the fragment transaction is reversed, and upon returning to this fragment, the collapsing toolbar is in expanded state but scroll pos in recycler view has been retained. it almost looks like the Collapsing toolbar expands as the fragment is exiting, so when returning to it, it's now in expanded state. I tested with version |
Yes, it is not fixed. I tested it with |
Description:
The pretty much standard layout of
in fragment works pretty well until fragment transaction happens (e.g. switch to another fragment and come back).
With no
exitUntilCollapsed
flag set original fragment got restored as it should keeping the scroll position etc. But if this flag is set various issues happen after the fragment transaction including scroll position reset (sometimes) and (pretty much always) inability to move scrolled content (including overscroll effect) to the view port.Removal of
exitUntilCollapsed
flag makes the whole thing work again but at the price of Toolbar visibility.Source code:
https://github.com/material-components/material-components-android/blob/master/catalog/java/io/material/catalog/tableofcontents/res/layout/cat_toc_fragment.xml
Android API version:
23
Material Library version:
master branch
Device:
LG G3
Demo:
After I've switched to another fragment and came back the part of content ("Transitions" label, overscroll etc) became unavailable:
The text was updated successfully, but these errors were encountered: