Android-UndoBar

General

Category
Free
Tag
Toasts
License
MIT License
Min SDK
8 (Android 2.2–2.2.3 Froyo)
Registered
Jul 5, 2014
Favorites
3
Link
https://github.com/jenzz/Android-UndoBar
See also
MessageBar
Cue
Toasty
Notti
Magic Toast

Additional

Language
Java
Version
v1.3 (Jan 8, 2015)
Created
Feb 4, 2014
Updated
May 14, 2016 (Retired)
Owner
Jens Driller (jenzz)
Contributors
Ben Weiss (keyboardsurfer)
Daniel Lew (dlew)
Jens Driller (jenzz)
Shyish
4
Activity
Badge
Generate
Download
Source code

DEPRECATED

Android-UndoBar is deprecated. No more development will be taking place.

Use Google's Snackbar instead.

Android - UndoBar

As seen in Google's Gmail app.

Screenshots

  • pre KitKat

  • KitKat

  • Lollipop and later

Usage

  • It's as simple as:
new UndoBar.Builder(this)//
  .setMessage("X items deleted.")//
  .setListener(this)//
  .show();
  • You can also explicitly use one of the styles shown above. This is useful, for example, if you want to show a consistent Material Design style across all API levels. By default, it uses the style of the device's current API level. Here's an example:
new UndoBar.Builder(this)//
  .setMessage("X items deleted.")//
  .setListener(this)//
  .setStyle(UndoBar.Style.LOLLIPOP)//
  .show();

Example

Check out the sample project for an example implementation.

Download

Grab it via Gradle:

For API Level >= 15:

compile 'com.github.jenzz.undobar:library:1.3:api15Release@aar'

For API Level < 15 (includes nineoldandroids):

compile 'com.github.jenzz.undobar:library:1.3:api8Release@aar'

Still using Eclipse? Check out the master_eclipse branch and import it as a library project.
Note that the Eclipse implementation is v1.1 only and won't receive any future updates.

License

This project is licensed under the MIT License.