-
Notifications
You must be signed in to change notification settings - Fork 151
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
Feature: Displaying snackbar at the top/bottom of desired component #15
Comments
This feature sounds similar in nature to #11; easy to do with plain JS, but hard to do natively. I would love to re-write this library to be completely JS and not require any linking, but I just haven't had the time quite yet. I'm very open to PRs though :) |
Nooo complete js please! hahah The native part is the most awesome part! I think it can easily be supported natively with |
The native snackbar also respects the native FAB - https://guides.codepath.com/android/Handling-Scrolls-with-CoordinatorLayout#responding-to-scroll-events - pretty please no pure js haha |
Both could be supported at once -- it's not either/or 🙂 There are advantages to each. |
I edited the issue description to suggest a generic solution. This is a quite popular request! I would happily merge a PR that does this well. |
note: #186 was just released as v2.6.0. |
It would be nice to have the snackbar displayed at the top/bottom of required components instead of displaying at the very bottom of the whole app. This is especially useful if the app has tabBar at the bottom or when the snackbar has to show on top (again not at the very top but at the top of the desired component)
Edit from maintainer:
A simple, generic way to accomplish this might be to use a
top
andbottom
value similar to how CSS works. Withtop: 0
, the Snackbar would be at the very top of the screen. Withbottom: 50
, the Snackbar would be 50 dp above the bottom of the screen.This was originally attempted in #137 but the PR was abandoned before it could be merged. Feel free to take that work as an example.
The text was updated successfully, but these errors were encountered: