MrEngineer13/SnackBar
MrEngineer13/SnackBar has 1,211 GitHub stars and 174 forks. Star changes are not measured yet. Last checked 2026-11-09 07:43 UTC. Last push 2020-10-15.
toast-like alert pattern for Android inspired by the Google Material Design Spec
What you can do
- Set message text and optionally duration
- Shows only one message at a time
- Can have action item (e.g. undo, refresh, etc.)
- Set text color of action items
Measured star growth
- in 24h
- Update delayed
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalSnackBar; toast-like alert pattern for Android inspired by the Google Material Design Spec

Deprecated
This library is deprecated in favor of the new Design Support Library which includes a Snackbar. It is due to this development that this library is no longer activly being developed.
Features
- Set message text and optionally duration
- Shows only one message at a time
- Can have action item (e.g. undo, refresh, etc.)
- Set text color of action items
- Swipe down to dismiss all notifications as per documentation
- Backwards compatible to 2.3.x
New Features since 1.0.0
- Set custom background color
- Set custom height
- Set custom typeface

Usage
- Add SnackBar to your project
###Maven
Just add the following to your build.gradle.
dependencies {
compile 'com.github.mrengineer13:snackbar:1.2.0'
}
- Show a message
Build SnackBar in Activity
new SnackBar.Builder(this)
.withOnClickListener(this)
.withMessage("This library is awesome!") // OR
.withMessageId(messageId)
.withTypeFace(myAwesomeTypeFace)
.withActionMessage("Action") // OR
.withActionMessageId(actionMsgId)
.withTextColorId(textColorId)
.withBackGroundColorId(bgColorId)
.withVisibilityChangeListener(this)
.withStyle(style)
.withDuration(duration)
.show();
Build SnackBar in Fragment
new SnackBar.Builder(getActivity().getApplicationContext(), root)
.withOnClickListener(this)
.withMessage("This library is awesome!") // OR
.withMessageId(messageId)
.withTypeFace(myAwesomeTypeFace)
.withActionMessage("Action") // OR
.withActionMessageId(actionMsgId)
.withTextColorId(textColorId)
.withBackGroundColorId(bgColorId)
.withVisibilityChangeListener(this)
.withStyle(style)
.withDuration(duration)
.show();
Using this library?
If you're using this library in one of your projects just send me a tweet and I'll add your project to the list.
| Icon | Application |
|---|---|
| Plume | |
| Score It | |
| Lotería Navidad 2014 | |
| Journal | |
| My Garage | |
| QuoteMe |
Contribution
Pull requests are welcome!
Feel free to contribute to SnackBar.
Just create your branch then submit pull request on the dev branch.
If you have a bug to report a feature to request or have other questions, file an issue. I'll try to answer as soon as I can.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,590 starspublic-apis/public-apis
A collective list of free APIs
497,908 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
449,688 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,301 stars