From 208736530d88386d6d1d23624ec03cd84881bf32 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 5 Jun 2015 15:18:09 -0700 Subject: Change text to "add to a contact". Bug: 21550993 Change-Id: Ib903d19c589709a414ef475c8450843054f81375 --- res/values/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 213d340dd..d8a8ffe19 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -51,7 +51,7 @@ Edit number before call - Add to contacts + Add to a contact Delete from call history @@ -500,7 +500,7 @@ - Add to contact + Add to a contact Send SMS -- cgit v1.2.3 From 0284f76fe813c4ebdf1d0d3472060719757fe394 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 5 Jun 2015 15:58:27 -0700 Subject: Show empty view after load returns empty. ... instead of before. Mildly disorienting as a loading experience. Bug: 19937778 Change-Id: Id1c7d48f3379350030aaed4f4a50320d22f970f6 --- src/com/android/dialer/list/AllContactsFragment.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/com/android/dialer/list/AllContactsFragment.java b/src/com/android/dialer/list/AllContactsFragment.java index eaa5cc808..20e88e22b 100644 --- a/src/com/android/dialer/list/AllContactsFragment.java +++ b/src/com/android/dialer/list/AllContactsFragment.java @@ -16,6 +16,7 @@ package com.android.dialer.list; +import android.content.Loader; import android.database.Cursor; import android.net.Uri; import android.provider.ContactsContract.CommonDataKinds.Phone; @@ -39,6 +40,8 @@ import com.android.dialer.util.DialerUtils; */ public class AllContactsFragment extends ContactEntryListFragment { + private View mEmptyListView; + public AllContactsFragment() { setQuickContactEnabled(false); setAdjustSelectionBoundsEnabled(true); @@ -52,10 +55,11 @@ public class AllContactsFragment extends ContactEntryListFragment loader, Cursor data) { + super.onLoadFinished(loader, data); + + if (data.getCount() == 0) { + mEmptyListView.setVisibility(View.VISIBLE); + } + } + @Override protected ContactEntryListAdapter createListAdapter() { if (!PermissionsUtil.hasContactsPermissions(getActivity())) { -- cgit v1.2.3