Gallery2添加删除图标

在图片展示界面的右上角添加一个删除的图标,并交换删除图标和分享图标的位置:

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"


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值