Commit Graph

2 Commits

Author SHA1 Message Date
Tony Wickham 08c7cd5625 Update undo snackbar visuals
- Use accent color for action
- Update font-family to use TextTitle style
- Reduce elevation to 3dp
- Inset snackbar left/right margins more, unless we need to increase the
  width to fit the text
- For largest display/font size, fallback to 2 lines and smaller font if
  necessary to not cut off the label
- Remove top/bottom padding on action (b/114084048)
- Allow up to 20 char for the action (b/114317987)

Change-Id: I833c102aaac3ba3db2283997c142926c3830336d
2018-09-11 15:35:47 -07:00
Tony Wickham 6a71a5bd77 Add undo snackbar for deleting items
- Add methods to ModelWriter to prepareForUndoDelete, then
  enqueueDeleteRunnable, followed by commitDelete or abortDelete.
- Add Snackbar floating view
- Show Undo snackbar when dropping or flinging to delete target; if the
  undo action is clicked, we abort the delete, otherwise we commit it.

Bug: 24238108
Change-Id: I9997235e1f8525cbb8b1fa2338099609e7358426
2018-08-30 16:22:25 -07:00