I wanted to provide the SnackBar
animation from top, instead of the regular behavior that displays the SnackBar
from bottom. Is this easily hackable?
Snackbars should be placed at the bottom of a UI, in front of app content.
Snackbars contain a single line of text directly related to the operation performed. They may contain a text action, but no icons. Toasts (Android only) are primarily used for system messaging. They also display at the bottom of the screen, but may not be swiped off-screen.
Snackbar in android is a new widget introduced with the Material Design library as a replacement of a Toast. Android Snackbar is light-weight widget and they are used to show messages in the bottom of the application with swiping enabled. Snackbar android widget may contain an optional action button.
it is possible. check this library made by me https://github.com/AndreiD/TSnackBar
basically you add 2 new animations for sliding from top, and change the gravity of the layout. That's all :)
Later Edit: there's a bug going on.... . if anyone wants to spend some time into fixing it we'd all appreciate it :)
No it is not possible. The documentation states that
They show a brief message at the bottom of the screen on mobile and lower left on larger devices. Snackbars appear above all other elements on screen and only one can be displayed at a time.
You could use a third part library, like Crouton for instance
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With