Merge "Add touch feedback to undo area of leave behind." into jb-ub-mail
diff --git a/res/layout/swipe_leavebehind.xml b/res/layout/swipe_leavebehind.xml
index dfdb3ba..3362286 100644
--- a/res/layout/swipe_leavebehind.xml
+++ b/res/layout/swipe_leavebehind.xml
@@ -46,27 +46,34 @@
             android:layout_width="1dip"
             android:layout_height="match_parent"
             android:layout_marginBottom="20dip"
-            android:layout_marginRight="12dip"
             android:layout_marginTop="20dip"
             android:background="@android:color/white" />
 
-        <ImageView
-            android:id="@+id/undo_icon"
+        <RelativeLayout
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:layout_marginRight="8dip"
-            android:src="@drawable/ic_menu_revert_holo_dark" />
-
-        <TextView
-            android:id="@+id/undo_text"
-            style="@style/UndoTextStyle"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:paddingRight="16dip"
-            android:text="@string/undo"
-            android:textAllCaps="true"
+            android:id="@+id/undo_button"
             android:clickable="true"
-            android:gravity="center_vertical"
-            android:textColor="@android:color/white" />
+            android:background="?android:attr/selectableItemBackground">
+            <ImageView
+                android:id="@+id/undo_icon"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="12dip"
+                android:layout_marginRight="8dip"
+                android:src="@drawable/ic_menu_revert_holo_dark" />
+
+            <TextView
+                android:id="@+id/undo_text"
+                style="@style/UndoTextStyle"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:paddingRight="16dip"
+                android:text="@string/undo"
+                android:textAllCaps="true"
+                android:gravity="center_vertical"
+                android:textColor="@android:color/white"
+                android:layout_toRightOf="@id/undo_icon" />
+        </RelativeLayout>
     </LinearLayout>
 </com.android.mail.ui.LeaveBehindItem>
\ No newline at end of file
diff --git a/src/com/android/mail/ui/LeaveBehindItem.java b/src/com/android/mail/ui/LeaveBehindItem.java
index b1b5976..b640581 100644
--- a/src/com/android/mail/ui/LeaveBehindItem.java
+++ b/src/com/android/mail/ui/LeaveBehindItem.java
@@ -75,8 +75,7 @@
     public void onClick(View v) {
         int id = v.getId();
         switch (id) {
-            case R.id.undo_text:
-            case R.id.undo_icon:
+            case R.id.undo_button:
                 if (mAccount.undoUri != null) {
                     // NOTE: We might want undo to return the messages affected,
                     // in which case the resulting cursor might be interesting...
@@ -101,8 +100,7 @@
         mText = ((TextView) findViewById(R.id.undo_descriptionview));
         mText.setText(Html.fromHtml(mUndoOp
                 .getSingularDescription(getContext(), folder)));
-        findViewById(R.id.undo_text).setOnClickListener(this);
-        findViewById(R.id.undo_icon).setOnClickListener(this);
+        findViewById(R.id.undo_button).setOnClickListener(this);
     }
 
     public void commit() {