diff options
author | Ray Chen <raychen@google.com> | 2012-04-05 17:25:43 +0800 |
---|---|---|
committer | Ray Chen <raychen@google.com> | 2012-04-23 16:20:15 +0800 |
commit | 85c9ea40b0026befe79c4ba866a73f5d58ee5555 (patch) | |
tree | dcb196007bac84cd4692cf1246cd6ecf4b616426 /src/com/android/gallery3d/app/PhotoPage.java | |
parent | 6e98a5bb1862af0056fe009184dc8aa2fc4611a2 (diff) | |
download | android_packages_apps_Snap-85c9ea40b0026befe79c4ba866a73f5d58ee5555.tar.gz android_packages_apps_Snap-85c9ea40b0026befe79c4ba866a73f5d58ee5555.tar.bz2 android_packages_apps_Snap-85c9ea40b0026befe79c4ba866a73f5d58ee5555.zip |
Fix 6046544 Deleting a photo takes multiple steps and the flow is inconsistent with other deleting flows on other core apps
This CL adds a confirm dialog to delete command and removes all confirm/cancel menu items from the actionbar.
b:6046544
Change-Id: I3afe7b59b4f6d1216e192a621621f7bf544e1919
Diffstat (limited to 'src/com/android/gallery3d/app/PhotoPage.java')
-rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 78bb34cab..6be302b24 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -435,6 +435,7 @@ public class PhotoPage extends ActivityState DataManager manager = mActivity.getDataManager(); int action = item.getItemId(); + boolean needsConfirm = false; switch (action) { case android.R.id.home: { if (mSetPathString != null) { @@ -480,20 +481,21 @@ public class PhotoPage extends ActivityState } return true; } + case R.id.action_delete: + needsConfirm = true; case R.id.action_setas: - case R.id.action_confirm_delete: case R.id.action_rotate_ccw: case R.id.action_rotate_cw: case R.id.action_show_on_map: case R.id.action_edit: mSelectionManager.deSelectAll(); mSelectionManager.toggle(path); - mMenuExecutor.onMenuClicked(item, null); + mMenuExecutor.onMenuClicked(item, needsConfirm, null); return true; case R.id.action_import: mSelectionManager.deSelectAll(); mSelectionManager.toggle(path); - mMenuExecutor.onMenuClicked(item, + mMenuExecutor.onMenuClicked(item, needsConfirm, new ImportCompleteListener(mActivity)); return true; default : |