soarcn/UndoBar — pull request #16 by httpdispatch (2014-04-25 10:42:59+00:00)
Title: CountDown style like in ListViewAnimations (https://github.com/nhaarman/ListViewAnimations)

Thanks for your library. I've modified it and added possibility to have UndoBar with countdown (like in ListViewAnimations/SwipeToDismiss demo). Perhaps this will be useful for somebody

![image](https://cloud.githubusercontent.com/assets/2315223/2799767/0560e2fe-cc66-11e3-83a3-6fd802778d64.png)

library:
- UndoBarController: removed mHideRunnable field
- UndoBarController: added new fields mDismissStartMillis,
mCountDownRunnable, mMessageCountdownView
- UndoBarController: added mCountDownRunnable, mMessageCountdownView
fields initialization to the constructor
- UndoBarController: updated runnable reference for the removeCallback
call in the undoBar method
- UndoBarController: modified showUndoBar to adjust visibility and text
of mMessageCountdownView if countDownFormatter is present in the style
- UndoBarController: updated hide handler logic in the showUndoBar
method
- UndoBarController.CountDownRunnable: added
- UndoBarStyle: added countDownFormatter field and its setter method
- UndoBarStyle: added countDownFormatter support to parcelable
implementation
- res/layout/undobar.xml: reworked TextView part, added hidden countdown
view below it
- res/values/styles.xml: added UndoBarMessageContainer,
UndoBarMessageCountdown, UndoBarMessageContainerClassic,
UndoBarMessageCountdownClassic, UndoBarMessageContainerKitKat,
UndoBarMessageCountdownKitKat styles

demo:
- MainActivity: added onClick handling for the button5
- UndoCountdownStyle: added
- res/layout/activity_main.xml: added button5 declaration
- res/values/strings.xml: added couple of string constants
- res/values/styles.xml: added definition for the
UndoBarMessageContainer and UndoBarMessageCountdown styles
- AndroidManifest.xml: added UndoCountdownStyle activity declaration