Skip to content
Related Articles

Related Articles

Improve Article
Difference between Android Toast and SnackBar
  • Last Updated : 27 May, 2021

1. Toast : 
It is an Android UI component that is used to show message or notification that does not require any user action. It is independent to the activity in which it is being shown and disappears automatically after the set duration. 


2. SnackBar : 
It is Android material design UI component. It is used to show popup message to user that requires some user action. It can disappear automatically after set time or can be dismissed by user. 


Difference between Toast and SnackBar : 


S. No.ToastSnackBar
1.Toast is Android UI component present since API 1 It was later introduced with material design in API 23
2.It is not linked to an activity.It is linked with parent activity.
3.User input can’t be taken.User input can be taken.
4.It can’t be shown indefinitelyIt can be shown for indefinite duration
5.It can’t be closed by user actionIt can be closed by user action.
6.It is mostly used to show feedback messageIt is used show message that need user action
7.It is used for showing info messages to userIt is used for showing warning/info type messages to user that needs attention.
8.It can’t be closed by swiping.It can be closed by swipe.


My Personal Notes arrow_drop_up
Recommended Articles
Page :