Add no favorite card to the Dialer

Bug: 10862541
Change-Id: I7299d38dcc63fa2a37e61949ebfcc794c3471c70
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 9d63514..fe1e644 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -63,6 +63,11 @@
                 android:contentDescription="@string/description_start_voice_search"
                 android:background="?android:attr/selectableItemBackground" />
         </LinearLayout>
+        <View
+            android:id="@+id/searchbox_divider"
+            android:layout_height="1dp"
+            android:layout_width="match_parent"
+            android:background="@color/background_dialer_light" />
         <FrameLayout
             android:layout_height="0dp"
             android:layout_weight="1"
diff --git a/res/layout/phone_favorites_fragment.xml b/res/layout/phone_favorites_fragment.xml
index 4d3abf4..f518f0b 100644
--- a/res/layout/phone_favorites_fragment.xml
+++ b/res/layout/phone_favorites_fragment.xml
@@ -15,19 +15,23 @@
 -->
 
 <!-- Use LinearLayout + FrameLayout, just to rely on android:divider and android:showDividers -->
-<LinearLayout
+<RelativeLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical"
     android:divider="?android:attr/dividerHorizontal"
     android:showDividers="end"
     android:clipChildren="false"
     android:background="@color/background_dialer_light">
+
     <FrameLayout
+        android:id="@+id/contact_tile_frame"
         android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1">
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true">
+
         <com.android.dialer.list.PhoneFavoriteListView
             android:id="@+id/contact_tile_list"
             android:layout_width="match_parent"
@@ -37,19 +41,22 @@
             android:fadingEdge="none"
             android:divider="@null" />
 
-        <TextView
-            android:id="@+id/contact_tile_list_empty"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:gravity="center"
-            android:layout_marginTop="@dimen/empty_message_top_margin"
-            android:textColor="?android:attr/textColorSecondary"
-            android:textAppearance="?android:attr/textAppearanceLarge"/>
-
         <ImageView
             android:id="@+id/contact_tile_drag_shadow_overlay"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:visibility="gone"/>
     </FrameLayout>
-</LinearLayout>
+
+    <include
+        android:id="@+id/phone_no_favorites_view"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@id/contact_tile_frame"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true"
+        android:layout_alignParentBottom="true"
+        layout="@layout/phone_no_favorites"
+        android:visibility="gone"/>
+
+</RelativeLayout>
diff --git a/res/layout/phone_no_favorites.xml b/res/layout/phone_no_favorites.xml
index 9fa5d47..e0635de 100644
--- a/res/layout/phone_no_favorites.xml
+++ b/res/layout/phone_no_favorites.xml
@@ -14,21 +14,53 @@
      limitations under the License.
 -->
 
-<FrameLayout
+<RelativeLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:orientation="vertical"
     android:minHeight="?android:attr/listPreferredItemHeight">
 
+    <ImageView
+        android:id="@+id/nofavorite_image"
+        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:layout_gravity="center"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true"
+        android:paddingTop="36dp"
+        android:paddingBottom="16dp"
+        android:src="@drawable/no_favorites_banner" />
+
+    <FrameLayout
+        android:id="@+id/show_all_contact_button_in_nofav_frame"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true"
+        android:background="@color/background_dialer_list_items">
+
+        <include
+            android:id="@+id/show_all_contact_button_in_nofav"
+            layout="@layout/show_all_contact_button" />
+    </FrameLayout>
+
     <TextView
         android:id="@+id/title"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
         android:gravity="center"
-        android:text="@string/listTotalAllContactsZeroStarred"
+        android:layout_below="@id/nofavorite_image"
+        android:layout_above="@id/show_all_contact_button_in_nofav_frame"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true"
+        android:text="@string/no_favorites"
         android:textAppearance="?android:attr/textAppearanceLarge"
-        android:textColor="?android:attr/textColorSecondary"
+        android:textColor="@color/nofavorite_text_color"
         android:layout_marginTop="8dp"
         android:layout_marginBottom="8dp"/>
 
-</FrameLayout>
+</RelativeLayout>