diff options
author | Andrew Lee <anwlee@google.com> | 2014-06-10 15:09:46 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-06-10 16:37:10 -0700 |
commit | 0a4327e6bfeedc23ddefb4df9f6e8041ebc87b59 (patch) | |
tree | 3fb090bcdcab68a17e4539b22241b4b28f9614c0 /res | |
parent | a6d7bd355e37674b4982525227bc969ea3a0c738 (diff) |
Update empty list assets and text.
- Add new assets for empty lists, delete old no favorites banner.
- Adapt phone_no_favorites.xml into generic container shown when
a list is empty.
- Add helper to DialerUtils to configure empty list view with
a provided image and message.
- Configure empty list view in relevant fragments.
- Some text styling/margin/padding to get things to spec. A
minimum height is used on the message so that the icons and text
will be laid out in a consistent manner.
Bug: 15513399
Change-Id: I52337a4544065a991d3b8084d96b01516a458c42
Diffstat (limited to 'res')
22 files changed, 36 insertions, 32 deletions
diff --git a/res/drawable-hdpi/empty_call_log.png b/res/drawable-hdpi/empty_call_log.png Binary files differnew file mode 100644 index 000000000..d6f6daaab --- /dev/null +++ b/res/drawable-hdpi/empty_call_log.png diff --git a/res/drawable-hdpi/empty_contacts.png b/res/drawable-hdpi/empty_contacts.png Binary files differnew file mode 100644 index 000000000..d3c0378f5 --- /dev/null +++ b/res/drawable-hdpi/empty_contacts.png diff --git a/res/drawable-hdpi/empty_speed_dial.png b/res/drawable-hdpi/empty_speed_dial.png Binary files differnew file mode 100644 index 000000000..3e9232fc9 --- /dev/null +++ b/res/drawable-hdpi/empty_speed_dial.png diff --git a/res/drawable-hdpi/no_favorites_banner.png b/res/drawable-hdpi/no_favorites_banner.png Binary files differdeleted file mode 100644 index a4b09c0a9..000000000 --- a/res/drawable-hdpi/no_favorites_banner.png +++ /dev/null diff --git a/res/drawable-mdpi/empty_call_log.png b/res/drawable-mdpi/empty_call_log.png Binary files differnew file mode 100644 index 000000000..3cd59b35b --- /dev/null +++ b/res/drawable-mdpi/empty_call_log.png diff --git a/res/drawable-mdpi/empty_contacts.png b/res/drawable-mdpi/empty_contacts.png Binary files differnew file mode 100644 index 000000000..2ce7eae37 --- /dev/null +++ b/res/drawable-mdpi/empty_contacts.png diff --git a/res/drawable-mdpi/empty_speed_dial.png b/res/drawable-mdpi/empty_speed_dial.png Binary files differnew file mode 100644 index 000000000..98152e0d3 --- /dev/null +++ b/res/drawable-mdpi/empty_speed_dial.png diff --git a/res/drawable-mdpi/no_favorites_banner.png b/res/drawable-mdpi/no_favorites_banner.png Binary files differdeleted file mode 100644 index ac080b9e1..000000000 --- a/res/drawable-mdpi/no_favorites_banner.png +++ /dev/null diff --git a/res/drawable-xhdpi/empty_call_log.png b/res/drawable-xhdpi/empty_call_log.png Binary files differnew file mode 100644 index 000000000..14ec04ba1 --- /dev/null +++ b/res/drawable-xhdpi/empty_call_log.png diff --git a/res/drawable-xhdpi/empty_contacts.png b/res/drawable-xhdpi/empty_contacts.png Binary files differnew file mode 100644 index 000000000..65b1de333 --- /dev/null +++ b/res/drawable-xhdpi/empty_contacts.png diff --git a/res/drawable-xhdpi/empty_speed_dial.png b/res/drawable-xhdpi/empty_speed_dial.png Binary files differnew file mode 100644 index 000000000..a3a76751b --- /dev/null +++ b/res/drawable-xhdpi/empty_speed_dial.png diff --git a/res/drawable-xhdpi/no_favorites_banner.png b/res/drawable-xhdpi/no_favorites_banner.png Binary files differdeleted file mode 100644 index bae4e99b8..000000000 --- a/res/drawable-xhdpi/no_favorites_banner.png +++ /dev/null diff --git a/res/drawable-xxhdpi/empty_call_log.png b/res/drawable-xxhdpi/empty_call_log.png Binary files differnew file mode 100644 index 000000000..501d7f1e2 --- /dev/null +++ b/res/drawable-xxhdpi/empty_call_log.png diff --git a/res/drawable-xxhdpi/empty_contacts.png b/res/drawable-xxhdpi/empty_contacts.png Binary files differnew file mode 100644 index 000000000..407d78c9c --- /dev/null +++ b/res/drawable-xxhdpi/empty_contacts.png diff --git a/res/drawable-xxhdpi/empty_speed_dial.png b/res/drawable-xxhdpi/empty_speed_dial.png Binary files differnew file mode 100644 index 000000000..fb2ea5f15 --- /dev/null +++ b/res/drawable-xxhdpi/empty_speed_dial.png diff --git a/res/drawable-xxhdpi/no_favorites_banner.png b/res/drawable-xxhdpi/no_favorites_banner.png Binary files differdeleted file mode 100644 index 0e2a4fa3b..000000000 --- a/res/drawable-xxhdpi/no_favorites_banner.png +++ /dev/null diff --git a/res/layout/call_log_fragment.xml b/res/layout/call_log_fragment.xml index fb7ed2a16..bb50730e8 100644 --- a/res/layout/call_log_fragment.xml +++ b/res/layout/call_log_fragment.xml @@ -72,14 +72,14 @@ android:divider="@null" android:nestedScrollingEnabled="true" /> - <TextView android:id="@android:id/empty" + + <include + android:id="@+id/empty_list_view" android:layout_width="match_parent" android:layout_height="match_parent" - android:text="@string/recentCalls_empty" - android:gravity="center" - android:layout_marginTop="@dimen/empty_message_top_margin" - android:textColor="?android:attr/textColorSecondary" - android:textAppearance="?android:attr/textAppearanceLarge" - /> + layout="@layout/empty_list_view" + android:visibility="gone"/> + </FrameLayout> + </LinearLayout> diff --git a/res/layout/phone_no_favorites.xml b/res/layout/empty_list_view.xml index b95afd197..be4dbf5af 100644 --- a/res/layout/phone_no_favorites.xml +++ b/res/layout/empty_list_view.xml @@ -30,28 +30,27 @@ android:layout_alignParentStart="true"/> <LinearLayout - android:id="@+id/nofavorite_frame" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:gravity="center" - android:layout_centerInParent="true"> + android:paddingBottom="@dimen/actionbar_and_tab_height" + android:layout_centerInParent="true" > + <ImageView - android:id="@+id/nofavorite_image" + android:id="@+id/emptyListViewImage" android:layout_height="wrap_content" android:layout_width="match_parent" - android:gravity="center_horizontal" - android:src="@drawable/no_favorites_banner" - android:layout_marginBottom="14dp" - android:contentDescription="@string/no_favorites"/> + android:gravity="center_horizontal" /> + <TextView - android:id="@+id/title" + android:id="@+id/emptyListViewMessage" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center_horizontal" - android:text="@string/no_favorites" - android:textAppearance="?android:attr/textAppearanceLarge" - android:textColor="@color/nofavorite_text_color"/> + android:minHeight="84dp" + android:gravity="center_horizontal|top" + android:textSize="@dimen/empty_list_message_text_size" + android:textColor="@color/empty_list_text_color" /> + </LinearLayout> </RelativeLayout> diff --git a/res/layout/show_all_contacts_fragment.xml b/res/layout/show_all_contacts_fragment.xml index 91fb3228c..fe188bddd 100644 --- a/res/layout/show_all_contacts_fragment.xml +++ b/res/layout/show_all_contacts_fragment.xml @@ -46,4 +46,11 @@ android:nestedScrollingEnabled="true" /> </FrameLayout> + <include + android:id="@+id/empty_list_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + layout="@layout/empty_list_view" + android:visibility="gone"/> + </LinearLayout> diff --git a/res/layout/speeddial_fragment.xml b/res/layout/speeddial_fragment.xml index f025e6179..58a7b2410 100644 --- a/res/layout/speeddial_fragment.xml +++ b/res/layout/speeddial_fragment.xml @@ -45,13 +45,10 @@ </FrameLayout> <include - android:id="@+id/phone_no_favorites_view" + android:id="@+id/empty_list_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" + layout="@layout/empty_list_view" android:visibility="gone"/> + </RelativeLayout> diff --git a/res/values/colors.xml b/res/values/colors.xml index 9264e3093..2bc1b5794 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -69,8 +69,7 @@ <!-- Undo dialogue color --> <color name="undo_dialogue_text_color">#4d4d4d</color> - <!-- Text color for no favorites message --> - <color name="nofavorite_text_color">#777777</color> + <color name="empty_list_text_color">#b2b2b2</color> <color name="remove_text_color">#ffffff</color> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 3533abd29..a01be9c0d 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -96,6 +96,10 @@ <!-- Height of the actionBar - this is 8dps bigger than the platform standard to give more room to the search box--> <dimen name="action_bar_height">64dp</dimen> + <dimen name="tab_height">43dp</dimen> + <dimen name="tab_elevation">2dp</dimen> + <!-- actionbar height + tab height --> + <dimen name="actionbar_and_tab_height">107dp</dimen> <!-- Margin to the left and right of the search box. --> <dimen name="search_margin_horizontal">8dp</dimen> @@ -119,10 +123,6 @@ <dimen name="search_list_padding_top">8dp</dimen> <dimen name="search_box_elevation">2dp</dimen> - <!-- Size of text in tabs. --> - <dimen name="tab_height">43dp</dimen> - <dimen name="tab_elevation">2dp</dimen> - <!-- Padding to the left and right of call log action buttons. --> <dimen name="call_log_action_horizontal_padding">8dp</dimen> <!-- Left-padding for the call log action buttons - ensures the buttons align with the text @@ -141,4 +141,6 @@ <!-- Size of icon for contacts number shortcuts --> <dimen name="search_shortcut_radius">40dp</dimen> + + <dimen name="empty_list_message_text_size">16sp</dimen> </resources> |