[DEPRECATED] An implementation of Android's Undo Bar as seen in Google's Gmail app.

Min SDK   8
Latest Commit   2016-05-14 13:51:02
License   MIT

Github   https://github.com/jenzz/Android-UndoBar

         

使用APP客户端扫描二维码运行Demo


...

jenzz
Shazam
London, UK

http://www.jenzz.com
None

         

类似的还有....
Crouton Context sensitive notifications for Android
SnackBar toast-like alert pattern for Android inspired by the Google Material Design Spec
Carousel-Notification Carousel-Notification lets you make carousel type notification where user can navigate within the notification. Selected item can be obtained using a broadcast receiver.
README

README.md

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

alt text alt text

  • KitKat

alt text alt text

  • Lollipop and later

alt text alt text

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.