More call log and favorites list UI changes.

Change-Id: Ie108539f5d116898a82586ddce3ec99c95a5bb34
diff --git a/res/layout-finger/contacts_list_item.xml b/res/layout-finger/contacts_list_item.xml
index 9d48d34..938f3aa 100644
--- a/res/layout-finger/contacts_list_item.xml
+++ b/res/layout-finger/contacts_list_item.xml
@@ -40,20 +40,19 @@
         android:layout_width="fill_parent"
         android:layout_height="?android:attr/listPreferredItemHeight"
         android:paddingLeft="14dip"
-        android:paddingRight="5dip"
     >
-    
+
         <ImageView android:id="@+id/presence"
             android:layout_width="32dip"
             android:layout_height="32dip"
             android:layout_alignParentRight="true"
             android:layout_marginLeft="5dip"
             android:layout_centerVertical="true"
-    
+
             android:gravity="center"
             android:scaleType="centerInside"
         />
-    
+
         <TextView android:id="@+id/label"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -61,13 +60,13 @@
             android:layout_alignParentBottom="true"
             android:layout_marginBottom="8dip"
             android:layout_marginTop="-8dip"
-    
+
             android:singleLine="true"
             android:ellipsize="marquee"
             android:textAppearance="?android:attr/textAppearanceSmall"
             android:textStyle="bold"
         />
-    
+
         <TextView android:id="@+id/data"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -76,12 +75,12 @@
             android:layout_alignBaseline="@id/label"
             android:layout_toLeftOf="@id/presence"
             android:layout_alignWithParentIfMissing="true"
-    
+
             android:singleLine="true"
             android:ellipsize="marquee"
             android:textAppearance="?android:attr/textAppearanceSmall"
         />
-    
+
         <TextView android:id="@+id/name"
             android:layout_width="0dip"
             android:layout_height="0dip"
@@ -91,24 +90,34 @@
             android:layout_alignParentLeft="true"
             android:layout_toLeftOf="@id/presence"
             android:layout_marginBottom="1dip"
-    
+
             android:singleLine="true"
             android:ellipsize="marquee"
             android:gravity="center_vertical|left"
             android:textAppearance="?android:attr/textAppearanceLarge"
         />
-            
+
         <ImageView android:id="@+id/call_button"
-	        android:layout_width="50dip"
-	        android:layout_height="50dip"
-	        android:layout_marginLeft="9dip"
-	        android:layout_alignParentRight="true"
-	        android:layout_centerVertical="true"
-	        
-	        android:gravity="center"
-	        android:src="@android:drawable/sym_action_call"
-	        android:background="@drawable/list_item_secondary_button"
-	    />
-    
+            android:layout_width="wrap_content"
+            android:layout_height="fill_parent"
+            android:paddingLeft="14dip"
+            android:paddingRight="14dip"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+
+            android:gravity="center"
+            android:src="@android:drawable/sym_action_call"
+            android:background="@android:drawable/list_selector_background"
+        />
+
+        <View android:id="@+id/divider"
+            android:layout_width="1dip"
+            android:layout_height="fill_parent"
+            android:layout_toLeftOf="@id/call_button"
+            android:layout_marginLeft="11dip"
+
+            android:background="@drawable/divider_vertical_dark"
+        />
+
     </RelativeLayout>
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/res/layout-finger/contacts_list_item_photo.xml b/res/layout-finger/contacts_list_item_photo.xml
index ef40018..7e1019b 100644
--- a/res/layout-finger/contacts_list_item_photo.xml
+++ b/res/layout-finger/contacts_list_item_photo.xml
@@ -26,7 +26,7 @@
         android:id="@+id/header" 
         layout="@layout/list_separator"
     />
-    
+
     <View android:id="@+id/list_divider"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
@@ -37,20 +37,19 @@
         android:layout_width="fill_parent"
         android:layout_height="?android:attr/listPreferredItemHeight"
         android:paddingLeft="5dip"
-        android:paddingRight="5dip"
     >
-    
+
         <ImageView android:id="@+id/presence"
             android:layout_width="32dip"
             android:layout_height="32dip"
             android:layout_alignParentRight="true"
             android:layout_marginLeft="5dip"
             android:layout_centerVertical="true"
-    
+
             android:gravity="center"
             android:scaleType="centerInside"
         />
-    
+
         <ImageView android:id="@+id/photo"
             android:layout_width="48dip"
             android:layout_height="52dip"
@@ -60,7 +59,7 @@
             android:scaleType="fitCenter"
             android:background="@*android:drawable/fasttrack_badge_dark"/>"
         />
-    
+
         <TextView android:id="@+id/label"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -68,13 +67,13 @@
             android:layout_alignParentBottom="true"
             android:layout_marginBottom="8dip"
             android:layout_marginTop="-10dip"
-    
+
             android:singleLine="true"
             android:ellipsize="marquee"
             android:textAppearance="?android:attr/textAppearanceSmall"
             android:textStyle="bold"
         />
-    
+
         <TextView android:id="@+id/data"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -83,12 +82,12 @@
             android:layout_toLeftOf="@id/presence"
             android:layout_alignBaseline="@id/label"
             android:layout_alignWithParentIfMissing="true"
-    
+
             android:singleLine="true"
             android:ellipsize="marquee"
             android:textAppearance="?android:attr/textAppearanceSmall"
         />
-    
+
         <TextView android:id="@+id/name"
             android:layout_width="0dip"
             android:layout_height="0dip"
@@ -97,24 +96,34 @@
             android:layout_alignParentTop="true"
             android:layout_above="@id/label"
             android:layout_alignWithParentIfMissing="true"
-    
+
             android:singleLine="true"
             android:ellipsize="marquee"
             android:gravity="center_vertical|left"
             android:textAppearance="?android:attr/textAppearanceLarge"
         />
-        
+
         <ImageView android:id="@+id/call_button"
-	        android:layout_width="50dip"
-	        android:layout_height="50dip"
-	        android:layout_marginLeft="9dip"
-	        android:layout_alignParentRight="true"
-	        android:layout_centerVertical="true"
-	        
-	        android:gravity="center"
-	        android:src="@android:drawable/sym_action_call"
-	        android:background="@drawable/list_item_secondary_button"
-	    />
-    
+            android:layout_width="wrap_content"
+            android:layout_height="fill_parent"
+            android:paddingLeft="14dip"
+            android:paddingRight="14dip"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+
+            android:gravity="center"
+            android:src="@android:drawable/sym_action_call"
+            android:background="@android:drawable/list_selector_background"
+        />
+
+        <View android:id="@+id/divider"
+            android:layout_width="1dip"
+            android:layout_height="fill_parent"
+            android:layout_toLeftOf="@id/call_button"
+            android:layout_marginLeft="11dip"
+
+            android:background="@drawable/divider_vertical_dark"
+        />
+
     </RelativeLayout>
 </LinearLayout>
diff --git a/res/layout-finger/recent_calls_list_item.xml b/res/layout-finger/recent_calls_list_item.xml
index 924e180..f463e57 100644
--- a/res/layout-finger/recent_calls_list_item.xml
+++ b/res/layout-finger/recent_calls_list_item.xml
@@ -4,9 +4,9 @@
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
-  
+
           http://www.apache.org/licenses/LICENSE-2.0
-  
+
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,35 +17,43 @@
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="?android:attr/listPreferredItemHeight"
-    android:paddingLeft="9dip"
-    android:paddingRight="9dip"
+    android:paddingLeft="7dip"
 >
 
     <ImageView android:id="@+id/call_icon"
-        android:layout_width="50dip"
-        android:layout_height="50dip"
-        android:layout_marginLeft="9dip"
+        android:layout_width="wrap_content"
+        android:layout_height="fill_parent"
+        android:paddingLeft="14dip"
+        android:paddingRight="14dip"
         android:layout_alignParentRight="true"
-        android:layout_centerVertical="true"
-        
-        android:gravity="center"
+
+        android:gravity="center_vertical"
         android:src="@android:drawable/sym_action_call"
-        android:background="@drawable/list_item_secondary_button"
+        android:background="@android:drawable/list_selector_background"
     />
-    
+
+    <View android:id="@+id/divider"
+        android:layout_width="1dip"
+        android:layout_height="fill_parent"
+        android:layout_toLeftOf="@id/call_icon"
+        android:layout_marginLeft="11dip"
+
+        android:background="@drawable/divider_vertical_dark"
+    />
+
     <ImageView android:id="@+id/call_type_icon"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_toLeftOf="@id/call_icon"
         android:layout_alignParentTop="true"
+        android:layout_toLeftOf="@id/divider"
     />
-    
+
     <TextView android:id="@+id/date"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:layout_toLeftOf="@id/divider"
         android:layout_alignParentBottom="true"
-        android:layout_toLeftOf="@id/call_icon"
-        android:layout_marginBottom="9dip"
+        android:layout_marginBottom="8dip"
 
         android:textAppearance="?android:attr/textAppearanceSmall"
         android:singleLine="true"
@@ -54,10 +62,11 @@
     <TextView android:id="@+id/label"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
         android:layout_alignParentBottom="true"
         android:layout_marginBottom="8dip"
         android:layout_marginTop="-10dip"
-        
+
         android:singleLine="true"
         android:ellipsize="marquee"
         android:textAppearance="?android:attr/textAppearanceSmall"
@@ -69,7 +78,6 @@
         android:layout_height="wrap_content"
         android:layout_marginLeft="5dip"
         android:layout_toRightOf="@id/label"
-        android:layout_toLeftOf="@id/date"
         android:layout_alignBaseline="@id/label"
         android:layout_alignWithParentIfMissing="true"
 
@@ -78,18 +86,17 @@
         android:textAppearance="?android:attr/textAppearanceSmall"
     />
 
-
     <TextView android:id="@+id/line1"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignParentTop="true"
         android:layout_alignParentLeft="true"
+        android:layout_alignParentTop="true"
         android:layout_above="@id/label"
         android:layout_alignWithParentIfMissing="true"
-        
+
         android:textAppearance="?android:attr/textAppearanceLarge"
         android:singleLine="true"
         android:gravity="center_vertical"
     />
-    
+
 </RelativeLayout>
diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java
index 94ba438..b595d44 100644
--- a/src/com/android/contacts/ContactsListActivity.java
+++ b/src/com/android/contacts/ContactsListActivity.java
@@ -584,11 +584,28 @@
     }
 
     /** {@inheritDoc} */
-    public void onClick(View view) {
-        // Clicked on photo, so show fast-track
-        final PhotoInfo info = (PhotoInfo)view.getTag();
-        final Uri contactUri = getContactUri(info.position);
-        showFastTrack(view, contactUri);
+    public void onClick(View v) {
+
+        switch (v.getId()) {
+            case R.id.call_button: {
+                final int position = (Integer) v.getTag();
+                Cursor c =  (Cursor) mAdapter.getItem(position);
+                if (c != null) {
+                    callContact(c);
+                }
+                break;
+            }
+
+            case R.id.photo: {
+                // Clicked on photo, so show fast-track
+                final PhotoInfo info = (PhotoInfo) v.getTag();
+                final int position = info.position;
+                final Uri contactUri = getContactUri(position);
+                showFastTrack(v, contactUri);
+                break;
+            }
+        }
+
     }
 
     private void setEmptyText() {