Added custom to prevent user to enter multiple phone numbers or sip addresses
This commit is contained in:
parent
06a8da9196
commit
ff4c733aca
2 changed files with 9 additions and 0 deletions
|
@ -77,6 +77,9 @@
|
|||
<bool name="hide_contact_phone_numbers">false</bool>
|
||||
<bool name="hide_contact_sip_addresses">false</bool>
|
||||
|
||||
<bool name="allow_only_one_phone_number">false</bool>
|
||||
<bool name="allow_only_one_sip_address">false</bool>
|
||||
|
||||
<bool name="setup_cancel_move_to_back">false</bool>
|
||||
|
||||
|
||||
|
|
|
@ -265,6 +265,9 @@ public class ContactEditorFragment extends Fragment {
|
|||
numbers = initNumbersFields(contact);
|
||||
|
||||
addSipAddress = (ImageView) view.findViewById(R.id.add_address_field);
|
||||
if (getResources().getBoolean(R.bool.allow_only_one_sip_address)) {
|
||||
addSipAddress.setVisibility(View.GONE);
|
||||
}
|
||||
addSipAddress.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
@ -273,6 +276,9 @@ public class ContactEditorFragment extends Fragment {
|
|||
});
|
||||
|
||||
addNumber = (ImageView) view.findViewById(R.id.add_number_field);
|
||||
if (getResources().getBoolean(R.bool.allow_only_one_phone_number)) {
|
||||
addNumber.setVisibility(View.GONE);
|
||||
}
|
||||
addNumber.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
|
Loading…
Reference in a new issue