Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Implement an "Undo" Bar in Android

DZone's Guide to

How to Implement an "Undo" Bar in Android

· Java Zone ·
Free Resource

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

Users hate to lose data, and it's a tough situation when it's a user error that leads to the loss. One solution, though, is a simple "undo" button, which can be a little bit difficult to implement on Android. So, here's a solution from Jens Driller: Android - UndoBar.

It's small and simple, and does exactly what it sounds like - a notification (modeled after Gmail's) that includes a message about the items deleted and an undo button - and it looks like this on pre-KitKat devices:

alt textalt text

And like this post-KitKat:

alt textalt text

Clean, easy to use, and good-looking. Check it out if you're interested in a simple yet useful solution, or if your users just keep accidentally deleting their stuff.

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. Our APIs verify, standardize, and correct the Big 4 + more – name, email, phone and global addresses – to ensure accurate delivery, prevent blacklisting and identify risks in real-time.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}