Can I disable the default Snackbar animation in android? If yes then how? Please give me an example.
Also, I want to know how to set a custom animation on Snackbar. Then how can I set the animation on Snackbar? Please give me a detailed explanation of that.
Thanks in advance.
As of android.support.design.widget.Snackbar
, you can't do that since the animation is hardcoded (note private methods animateViewIn()
and animateViewOut()
). So your best bet is to use some third-party view. For example, this library mimics the behavior of a stock SnackBar and allows you to set your own custom animation right in your xml with sb_inAnimation
and sb_outAnimation
.