在图片展示界面的右上角添加一个删除的图标,并交换删除图标和分享图标的位置:
niming@ubuntu:/home/user/workspace2/niming/a750/android/packages/apps/Gallery2$ git diff res/menu/photo.xml
diff --git a/res/menu/photo.xml b/res/menu/photo.xml
old mode 100644
new mode 100755
index 569272e..6b3affd
--- a/res/menu/photo.xml
+++ b/res/menu/photo.xml
@@ -22,6 +22,12 @@
<!-- Ideally, showAsAction for share_panorama and share should be reversed.
But, if share_panorama is set to never, it doesn't seem to get promoted
to the action bar and stays on the overflow menu. -->
+ <item android:id="@+id/action_delete"
+ android:icon="@drawable/ic_menu_trash_holo_light"
+ android:title="@string/delete"
+ android:visible="false"
+ android:showAsAction="ifRoom" />
+
<item android:id="@+id/action_share_panorama"
android:icon="@drawable/ic_menu_share_holo_light"
android:title="@string/share_panorama"
@@ -34,11 +40,7 @@
android:visible="false"
android:actionProviderClass="android.widget.ShareActionProvider"
android:showAsAction="never" />
- <item android:id="@+id/action_delete"
- android:icon="@drawable/ic_menu_trash_holo_light"
- android:title="@string/delete"
- android:visible="false"
- android:showAsAction="never" />
+
<item android:id="@+id/action_slideshow"
android:icon="@drawable/ic_menu_slideshow_holo_light"
android:title="@string/slideshow"