Restyle the Call Log Details. Make the whole contact picture a push target

Change-Id: I23fced4895a63181229cc0d2e003256f575dd40f
diff --git a/res/drawable-hdpi/ic_add_contact_holo_dark.png b/res/drawable-hdpi/ic_add_contact_holo_dark.png
new file mode 100644
index 0000000..1190bf6
--- /dev/null
+++ b/res/drawable-hdpi/ic_add_contact_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_add_contact_holo_light.png b/res/drawable-hdpi/ic_add_contact_holo_light.png
new file mode 100644
index 0000000..c0c201e
--- /dev/null
+++ b/res/drawable-hdpi/ic_add_contact_holo_light.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_fav_quickcontact_holo_dark.png b/res/drawable-hdpi/ic_contacts_holo_dark.png
similarity index 100%
rename from res/drawable-hdpi/ic_fav_quickcontact_holo_dark.png
rename to res/drawable-hdpi/ic_contacts_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/sym_action_add.png b/res/drawable-hdpi/sym_action_add.png
deleted file mode 100755
index 45a9ec5..0000000
--- a/res/drawable-hdpi/sym_action_add.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/sym_action_view_contact.png b/res/drawable-hdpi/sym_action_view_contact.png
deleted file mode 100755
index 3a016ff..0000000
--- a/res/drawable-hdpi/sym_action_view_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_add_contact_holo_dark.png b/res/drawable-mdpi/ic_add_contact_holo_dark.png
new file mode 100644
index 0000000..9aadd04
--- /dev/null
+++ b/res/drawable-mdpi/ic_add_contact_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_add_contact_holo_light.png b/res/drawable-mdpi/ic_add_contact_holo_light.png
new file mode 100644
index 0000000..84ec510
--- /dev/null
+++ b/res/drawable-mdpi/ic_add_contact_holo_light.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_fav_quickcontact_holo_dark.png b/res/drawable-mdpi/ic_contacts_holo_dark.png
similarity index 100%
rename from res/drawable-mdpi/ic_fav_quickcontact_holo_dark.png
rename to res/drawable-mdpi/ic_contacts_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/sym_action_add.png b/res/drawable-mdpi/sym_action_add.png
deleted file mode 100644
index af637b3..0000000
--- a/res/drawable-mdpi/sym_action_add.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/sym_action_view_contact.png b/res/drawable-mdpi/sym_action_view_contact.png
deleted file mode 100644
index 118d8b3..0000000
--- a/res/drawable-mdpi/sym_action_view_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_add_contact_holo_dark.png b/res/drawable-xhdpi/ic_add_contact_holo_dark.png
new file mode 100644
index 0000000..2eac542
--- /dev/null
+++ b/res/drawable-xhdpi/ic_add_contact_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_add_contact_holo_light.png b/res/drawable-xhdpi/ic_add_contact_holo_light.png
new file mode 100644
index 0000000..578df30
--- /dev/null
+++ b/res/drawable-xhdpi/ic_add_contact_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fav_quickcontact_holo_dark.png b/res/drawable-xhdpi/ic_contacts_holo_dark.png
similarity index 100%
rename from res/drawable-xhdpi/ic_fav_quickcontact_holo_dark.png
rename to res/drawable-xhdpi/ic_contacts_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_add.png b/res/drawable-xhdpi/sym_action_add.png
deleted file mode 100644
index 32f8e22..0000000
--- a/res/drawable-xhdpi/sym_action_add.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_view_contact.png b/res/drawable-xhdpi/sym_action_view_contact.png
deleted file mode 100644
index 2c14e56..0000000
--- a/res/drawable-xhdpi/sym_action_view_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/layout/call_detail.xml b/res/layout/call_detail.xml
index e436fcb..a4de03f 100644
--- a/res/layout/call_detail.xml
+++ b/res/layout/call_detail.xml
@@ -59,42 +59,46 @@
     >
         <!-- The voicemail fragment will be put here. -->
     </LinearLayout>
-    <LinearLayout
+    <View
+        android:id="@+id/photo_text_bar"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/call_detail_contact_background_overlay_height"
+        android:layout_height="42dip"
         android:background="#7F000000"
         android:layout_alignParentLeft="true"
         android:layout_alignBottom="@id/contact_background_sizer"
     />
+    <ImageView
+        android:id="@+id/main_action"
+        android:layout_width="wrap_content"
+        android:layout_height="0dip"
+        android:scaleType="center"
+        android:layout_alignRight="@id/photo_text_bar"
+        android:layout_alignBottom="@id/photo_text_bar"
+        android:layout_alignTop="@id/photo_text_bar"
+        android:layout_marginRight="@dimen/call_log_outer_margin"
+    />
     <RelativeLayout
-        android:id="@+id/contact_text"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/call_detail_contact_background_overlay_height"
-        android:layout_alignParentLeft="true"
-        android:layout_alignBottom="@id/contact_background_sizer"
-        android:paddingLeft="@dimen/call_detail_contact_name_margin"
+        android:layout_width="wrap_content"
+        android:layout_height="0dip"
+        android:layout_alignLeft="@id/photo_text_bar"
+        android:layout_alignTop="@id/photo_text_bar"
+        android:layout_toLeftOf="@id/main_action"
+        android:layout_alignBottom="@id/photo_text_bar"
+        android:layout_marginRight="@dimen/call_log_inner_margin"
+        android:layout_marginLeft="@dimen/call_detail_contact_name_margin"
     >
-        <ImageView
-            android:id="@+id/main_action"
-            android:layout_width="@dimen/call_log_call_action_size"
-            android:layout_height="match_parent"
-            android:gravity="center_vertical"
-            android:scaleType="center"
-            android:layout_alignParentRight="true"
-            android:layout_alignParentBottom="true"
-            android:layout_marginRight="@dimen/call_log_outer_margin"
-            android:layout_marginLeft="@dimen/call_log_inner_margin"
-        />
-        <RelativeLayout
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_alignParentLeft="true"
-            android:layout_toLeftOf="@id/main_action"
-            android:layout_alignParentBottom="true"
-        >
-            <include layout="@layout/call_log_phone_call_details" />
-        </RelativeLayout>
+        <include layout="@layout/call_log_phone_call_details" />
     </RelativeLayout>
+    <ImageButton
+        android:id="@+id/main_action_push_layer"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_alignLeft="@id/contact_background_sizer"
+        android:layout_alignTop="@id/contact_background_sizer"
+        android:layout_alignRight="@id/contact_background_sizer"
+        android:layout_alignBottom="@id/contact_background_sizer"
+        android:background="?android:attr/selectableItemBackground"
+    />
     <ListView
         android:id="@android:id/list"
         android:layout_width="match_parent"
diff --git a/res/layout/create_new_contact.xml b/res/layout/create_new_contact.xml
index 2c36017..2edaf3e 100644
--- a/res/layout/create_new_contact.xml
+++ b/res/layout/create_new_contact.xml
@@ -31,7 +31,7 @@
             android:layout_marginLeft="5dip"
             android:layout_marginRight="11dip"
             android:focusable="false"
-            android:src="@*android:drawable/sym_action_add"
+            android:src="@drawable/ic_add_contact_holo_light"
             android:scaleType="fitCenter"
             />
     <TextView android:id="@+id/title"
diff --git a/res/layout/quickcontact_photo_container.xml b/res/layout/quickcontact_photo_container.xml
index 4c05a4d..7df54d9 100644
--- a/res/layout/quickcontact_photo_container.xml
+++ b/res/layout/quickcontact_photo_container.xml
@@ -35,7 +35,7 @@
             android:background="#7F000000" />
         <ImageButton
             android:id="@+id/open_details_button"
-            android:src="@drawable/ic_fav_quickcontact_holo_dark"
+            android:src="@drawable/ic_contacts_holo_dark"
             android:background="?android:attr/selectableItemBackground"
             android:layout_height="wrap_content"
             android:layout_width="wrap_content"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 0264087..569f00b 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -219,7 +219,6 @@
     <dimen name="call_log_indent_margin">24dip</dimen>
     <dimen name="call_log_list_contact_photo_size">64dip</dimen>
     <dimen name="call_detail_contact_background_height">174dip</dimen>
-    <dimen name="call_detail_contact_background_overlay_height">42dip</dimen>
     <dimen name="call_detail_contact_name_margin">24dip</dimen>
     <dimen name="call_detail_action_bar_height">60dip</dimen>
 
diff --git a/src/com/android/contacts/CallDetailActivity.java b/src/com/android/contacts/CallDetailActivity.java
index e9a693e..a46d2e2 100644
--- a/src/com/android/contacts/CallDetailActivity.java
+++ b/src/com/android/contacts/CallDetailActivity.java
@@ -51,6 +51,7 @@
 import android.view.ViewGroup;
 import android.widget.AdapterView;
 import android.widget.BaseAdapter;
+import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.ListView;
 import android.widget.TextView;
@@ -82,6 +83,7 @@
     private PhoneNumberHelper mPhoneNumberHelper;
     private PhoneCallDetailsHelper mPhoneCallDetailsHelper;
     private ImageView mMainActionView;
+    private ImageButton mMainActionPushLayerView;
     private ImageView mContactBackgroundView;
 
     private String mNumber = null;
@@ -156,6 +158,7 @@
         mStatusMessageText = (TextView) findViewById(R.id.voicemail_status_message);
         mStatusMessageAction = (TextView) findViewById(R.id.voicemail_status_action);
         mMainActionView = (ImageView) findViewById(R.id.main_action);
+        mMainActionPushLayerView = (ImageButton) findViewById(R.id.main_action_push_layer);
         mContactBackgroundView = (ImageView) findViewById(R.id.contact_background);
         mDefaultCountryIso = ContactsUtils.getCurrentCountryIso(this);
         mContactPhotoManager = ContactPhotoManager.getInstance(this);
@@ -289,7 +292,7 @@
         if (details[0].personId != -1) {
             Uri personUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, personId);
             mainActionIntent = new Intent(Intent.ACTION_VIEW, personUri);
-            mainActionIcon = R.drawable.sym_action_view_contact;
+            mainActionIcon = R.drawable.ic_contacts_holo_dark;
         } else if (isVoicemailNumber) {
             mainActionIntent = null;
             mainActionIcon = 0;
@@ -309,7 +312,7 @@
             mainActionIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
             mainActionIntent.setType(Contacts.CONTENT_ITEM_TYPE);
             mainActionIntent.putExtra(Insert.PHONE, mNumber);
-            mainActionIcon = R.drawable.sym_action_add;
+            mainActionIcon = R.drawable.ic_add_contact_holo_dark;
         } else {
             // If we cannot call the number, when we probably cannot add it as a contact either.
             // This is usually the case of private, unknown, or payphone numbers.
@@ -319,10 +322,12 @@
 
         if (mainActionIntent == null) {
             mMainActionView.setVisibility(View.INVISIBLE);
+            mMainActionPushLayerView.setVisibility(View.GONE);
         } else {
             mMainActionView.setVisibility(View.VISIBLE);
             mMainActionView.setImageResource(mainActionIcon);
-            mMainActionView.setOnClickListener(new View.OnClickListener() {
+            mMainActionPushLayerView.setVisibility(View.VISIBLE);
+            mMainActionPushLayerView.setOnClickListener(new View.OnClickListener() {
                 @Override
                 public void onClick(View v) {
                     startActivity(mainActionIntent);