Snacky
Snacky copied to clipboard
Use single listener for many snackbars/actions.
Hello. On one fragment I have lots of different snackbars to show. I don't want to have inner callback class for each of actions. How to do that?
Just use a reference to your "single listener". Of course, if you want to know what to "action" then, you need refernces to the snackbar view, which is maybe even worse than inner classes. Maybe use lambdas to clean up your code.