summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorChristine Chen <christinech@google.com>2013-09-24 17:42:32 -0700
committerChristine Chen <christinech@google.com>2013-09-26 11:05:26 -0700
commit4fdf594962b3928c6497b471dbb1ee7be56e18ef (patch)
treec289bc21ef4e0a8a79f61294554cb2e7d78845fd /res
parentad4a5f1f6ded88bcf4e91f1819550619a8a99d19 (diff)
Add no favorite card to the Dialer
Bug: 10862541 Change-Id: I7299d38dcc63fa2a37e61949ebfcc794c3471c70
Diffstat (limited to 'res')
-rw-r--r--res/drawable-hdpi/no_favorites_banner.pngbin0 -> 7554 bytes
-rw-r--r--res/drawable-mdpi/no_favorites_banner.pngbin0 -> 4776 bytes
-rw-r--r--res/drawable-xhdpi/no_favorites_banner.pngbin0 -> 10881 bytes
-rw-r--r--res/drawable-xxhdpi/no_favorites_banner.pngbin0 -> 15409 bytes
-rw-r--r--res/layout/dialtacts_activity.xml5
-rw-r--r--res/layout/phone_favorites_fragment.xml35
-rw-r--r--res/layout/phone_no_favorites.xml42
-rw-r--r--res/values/colors.xml5
8 files changed, 68 insertions, 19 deletions
diff --git a/res/drawable-hdpi/no_favorites_banner.png b/res/drawable-hdpi/no_favorites_banner.png
new file mode 100644
index 000000000..5ab45ab46
--- /dev/null
+++ b/res/drawable-hdpi/no_favorites_banner.png
Binary files differ
diff --git a/res/drawable-mdpi/no_favorites_banner.png b/res/drawable-mdpi/no_favorites_banner.png
new file mode 100644
index 000000000..808d573e8
--- /dev/null
+++ b/res/drawable-mdpi/no_favorites_banner.png
Binary files differ
diff --git a/res/drawable-xhdpi/no_favorites_banner.png b/res/drawable-xhdpi/no_favorites_banner.png
new file mode 100644
index 000000000..da71882c3
--- /dev/null
+++ b/res/drawable-xhdpi/no_favorites_banner.png
Binary files differ
diff --git a/res/drawable-xxhdpi/no_favorites_banner.png b/res/drawable-xxhdpi/no_favorites_banner.png
new file mode 100644
index 000000000..518e8efbd
--- /dev/null
+++ b/res/drawable-xxhdpi/no_favorites_banner.png
Binary files differ
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 9d63514c1..fe1e644b0 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 4d3abf490..f518f0b92 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 9fa5d4781..e0635de2c 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>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index e64ea4ca9..3c3d41f53 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -67,4 +67,9 @@
<!-- Undo dialogue color -->
<color name="undo_dialogue_text_color">#4d4d4d</color>
+
+ <!-- Background color for no favorites state -->
+ <color name="nofavorite_background_color">#ffffff</color>
+ <!-- Text color for no favorites message -->
+ <color name="nofavorite_text_color">#a9a9a9</color>
</resources>