diff options
author | calderwoodra <calderwoodra@google.com> | 2017-07-17 14:10:31 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-07-25 09:03:49 -0700 |
commit | 3ab483433549d9dbc9b47cd5ad1b1d60b885a01a (patch) | |
tree | 7bdad99185af0b56498a2bb4e702a960f15bedd4 /java/com/android/dialer/contactsfragment/ContactsFragment.java | |
parent | 758e559760fad15661635854c85116366bc091a4 (diff) |
Hide contacts recyclerview when the last contact is deleted.
When a user would delete their last contact, the contacts fragment would show
a list with the old contact and the empty contacts background view underneath
it.
Test: ContactsFragmentTest
PiperOrigin-RevId: 162267124
Change-Id: I294f2fe06f08ba6bd31148681647ffe3d536e1bf
Diffstat (limited to 'java/com/android/dialer/contactsfragment/ContactsFragment.java')
-rw-r--r-- | java/com/android/dialer/contactsfragment/ContactsFragment.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/java/com/android/dialer/contactsfragment/ContactsFragment.java b/java/com/android/dialer/contactsfragment/ContactsFragment.java index 41fa8f9c5..50c9fe82c 100644 --- a/java/com/android/dialer/contactsfragment/ContactsFragment.java +++ b/java/com/android/dialer/contactsfragment/ContactsFragment.java @@ -122,8 +122,10 @@ public class ContactsFragment extends Fragment emptyContentView.setDescription(R.string.all_contacts_empty); emptyContentView.setActionLabel(R.string.all_contacts_empty_add_contact_action); emptyContentView.setVisibility(View.VISIBLE); + recyclerView.setVisibility(View.GONE); } else { emptyContentView.setVisibility(View.GONE); + recyclerView.setVisibility(View.VISIBLE); adapter = new ContactsAdapter(getContext(), cursor); manager = new LinearLayoutManager(getContext()) { |