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
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 7bc11c3..6d73dcb 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -259,9 +259,12 @@
<!-- Accessibility confirmation for item added to workspace. -->
<string name="item_added_to_workspace">Item added to home screen</string>
- <!-- Accessibility confirmation for item removed. -->
+ <!-- Accessibility confirmation for item removed. [CHAR_LIMIT=50]-->
<string name="item_removed">Item removed</string>
+ <!-- Action shown in snackbar to undo item removal. [CHAR_LIMIT=15] -->
+ <string name="undo">Undo</string>
+
<!-- Accessibility action to move an item on the workspace. [CHAR_LIMIT=30] -->
<string name="action_move">Move item</string>