-
Notifications
You must be signed in to change notification settings - Fork 3k
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
liftOnScroll not working with ViewPager? #163
Comments
Moved this over to buganizer: https://issuetracker.google.com/issues/111634113 |
Thank you! 👍 |
Same iusse.How to fix this? |
Currently
|
It is strange that |
You can now set |
How to enable liftOnScroll in a fragment? |
If by any chance you have multiple fragments with the same layout in ViewPager, having unique IDs for scroll containers and communicating them to AppBar is a whole new can of headache. While changing ID of view after getting an initial reference to them (using The safest way to do it, that I'm aware of, is by having an ID for each fragment in ViewPager stored in ids.xml. This adds a lot of manual labor, especially if you have a good number of ViewPager (also, it will not work with dynamically added fragments, if that's your things). Anything else I'm missing? |
Sorry for reviving this thread, but does anyone know how to get this working with a Edit: Solved this issue, turns out I needed to increase the ViewPager's |
Overview
When I set
app:liftOnScroll="true"
to my AppBarLayout, and then launch the app, I don't see any shadow, and scrolling down or up doesn't work.My Layout:
Version number
com.google.android.material:material:1.0.0-beta01
Operating system and device
Related issues
Someone already posted a similar issue (#140 ) but his issue was fixed by removing the bottom margin of his NestedScrollView. However I'm using a ViewPager, and I don't have any bottom margin in my layout.
The text was updated successfully, but these errors were encountered: