Fixed spinner in contacts list not being visible while fetching contacts
This commit is contained in:
parent
ab8bc312fb
commit
3c7948fdd5
1 changed files with 10 additions and 3 deletions
|
@ -146,6 +146,7 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
|
||||||
});
|
});
|
||||||
|
|
||||||
contactsFetchInProgress = (ProgressBar) view.findViewById(R.id.contactsFetchInProgress);
|
contactsFetchInProgress = (ProgressBar) view.findViewById(R.id.contactsFetchInProgress);
|
||||||
|
contactsFetchInProgress.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
@ -333,17 +334,23 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
|
||||||
noSipContact.setVisibility(View.GONE);
|
noSipContact.setVisibility(View.GONE);
|
||||||
noContact.setVisibility(View.GONE);
|
noContact.setVisibility(View.GONE);
|
||||||
contactsList.setVisibility(View.VISIBLE);
|
contactsList.setVisibility(View.VISIBLE);
|
||||||
contactsFetchInProgress.setVisibility(View.GONE);
|
|
||||||
|
|
||||||
|
ContactsListAdapter adapter;
|
||||||
if (onlyDisplayLinphoneContacts) {
|
if (onlyDisplayLinphoneContacts) {
|
||||||
contactsList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
|
contactsList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
|
||||||
contactsList.setAdapter(new ContactsListAdapter(ContactsManager.getInstance().getSIPContacts()));
|
adapter = new ContactsListAdapter(ContactsManager.getInstance().getSIPContacts());
|
||||||
|
contactsList.setAdapter(adapter);
|
||||||
edit.setEnabled(true);
|
edit.setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
contactsList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
|
contactsList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
|
||||||
contactsList.setAdapter(new ContactsListAdapter(ContactsManager.getInstance().getContacts()));
|
adapter = new ContactsListAdapter(ContactsManager.getInstance().getContacts());
|
||||||
|
contactsList.setAdapter(adapter);
|
||||||
edit.setEnabled(true);
|
edit.setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (adapter.getCount() > 0) {
|
||||||
|
contactsFetchInProgress.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
ContactsManager.getInstance().setLinphoneContactsPrefered(onlyDisplayLinphoneContacts);
|
ContactsManager.getInstance().setLinphoneContactsPrefered(onlyDisplayLinphoneContacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue