summaryrefslogtreecommitdiff
path: root/res/layout
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-06-10 15:09:46 -0700
committerAndrew Lee <anwlee@google.com>2014-06-10 16:37:10 -0700
commit0a4327e6bfeedc23ddefb4df9f6e8041ebc87b59 (patch)
tree3fb090bcdcab68a17e4539b22241b4b28f9614c0 /res/layout
parenta6d7bd355e37674b4982525227bc969ea3a0c738 (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/layout')
-rw-r--r--res/layout/call_log_fragment.xml14
-rw-r--r--res/layout/empty_list_view.xml (renamed from res/layout/phone_no_favorites.xml)25
-rw-r--r--res/layout/show_all_contacts_fragment.xml7
-rw-r--r--res/layout/speeddial_fragment.xml9
4 files changed, 29 insertions, 26 deletions
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>