There are situations where you might want your app to show a quick message to the user, without
necessarily waiting for the user to respond. For example, when a user performs an action like
sending an email or deleting a file, your app shows a quick confirmation to the user. Often, the
user doesn't need to respond to the message. The message needs to be prominent enough that the user
can see it, but not so prominent that it prevents the user from working with your app.
Android provides the
Snackbar
widget for this common use case. A Snackbar provides a quick pop-up message to the
user. The current activity remains visible and interactive while the Snackbar is
displayed. After a short time, the Snackbar automatically dismisses itself.
This documentation shows you how to use Snackbar to show pop-up messages.
Figure 1. A Snackbar
shows a message at the bottom of the
activity, and the rest of the activity is still usable.
Learn how to add an action to a message, letting the user respond to
the message.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-06-27 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-06-27 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-27 UTC."]]