fill in the first email and phone number of the contact

This commit is contained in:
tibbi
2017-12-18 15:16:58 +01:00
parent bb18218c0a
commit 77f1c2f2fa
4 changed files with 45 additions and 5 deletions

View File

@ -146,9 +146,25 @@ class ContactActivity : SimpleActivity() {
contact_first_name.setText(contact!!.firstName)
contact_middle_name.setText(contact!!.middleName)
contact_surname.setText(contact!!.surname)
//contact_number.setText(contact!!.number)
//contact_email.setText(contact!!.email)
contact_source.text = contact!!.source
contact!!.phoneNumbers.forEachIndexed { index, number ->
if (index == 0) {
contact_number.setText(number.value)
contact_number_type.setText(number.getTextId())
} else {
}
}
contact!!.emails.forEachIndexed { index, email ->
if (index == 0) {
contact_email.setText(email.value)
contact_email_type.setText(email.getTextId())
} else {
}
}
}
private fun setupNewContact() {