XAVlER-S / Android-UndoBar

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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();

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.

About

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

License:MIT License


Languages

Language:Java 100.0%