Fix toggle button
This commit is contained in:
parent
8cd9ab5898
commit
118e0f6b86
1 changed files with 8 additions and 3 deletions
|
@ -404,10 +404,14 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
|
||||||
private void changeContactsToggle() {
|
private void changeContactsToggle() {
|
||||||
if (onlyDisplayLinphoneContacts) {
|
if (onlyDisplayLinphoneContacts) {
|
||||||
allContacts.setEnabled(true);
|
allContacts.setEnabled(true);
|
||||||
|
allContactsSelected.setVisibility(View.INVISIBLE);
|
||||||
linphoneContacts.setEnabled(false);
|
linphoneContacts.setEnabled(false);
|
||||||
|
linphoneContactsSelected.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
allContacts.setEnabled(false);
|
allContacts.setEnabled(false);
|
||||||
|
allContactsSelected.setVisibility(View.VISIBLE);
|
||||||
linphoneContacts.setEnabled(true);
|
linphoneContacts.setEnabled(true);
|
||||||
|
linphoneContactsSelected.setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -427,18 +431,19 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
instance = this;
|
instance = this;
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
if (editConsumed) {
|
if (editConsumed) {
|
||||||
editOnClick = false;
|
editOnClick = false;
|
||||||
sipAddressToAdd = null;
|
sipAddressToAdd = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CONTACTS_LIST);
|
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CONTACTS_LIST);
|
||||||
LinphoneActivity.instance().hideTabBar(false);
|
LinphoneActivity.instance().hideTabBar(false);
|
||||||
onlyDisplayLinphoneContacts = ContactsManager.getInstance().isLinphoneContactsPrefered();
|
onlyDisplayLinphoneContacts = ContactsManager.getInstance().isLinphoneContactsPrefered();
|
||||||
}
|
}
|
||||||
|
changeContactsToggle();
|
||||||
|
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue