mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-04-16 10:57:21 +02:00
focus the new phone number or email fields at adding
This commit is contained in:
parent
b9af8116bc
commit
0d16efeafd
@ -385,17 +385,27 @@ class ContactActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun addNewPhoneNumberField() {
|
private fun addNewPhoneNumberField() {
|
||||||
val view = layoutInflater.inflate(R.layout.item_phone_number, contact_numbers_holder, false)
|
layoutInflater.inflate(R.layout.item_phone_number, contact_numbers_holder, false).apply {
|
||||||
updateTextColors(view as ViewGroup)
|
updateTextColors(this as ViewGroup)
|
||||||
setupPhoneNumberTypePicker(view.contact_number_type)
|
setupPhoneNumberTypePicker(contact_number_type)
|
||||||
contact_numbers_holder.addView(view)
|
contact_numbers_holder.addView(this)
|
||||||
|
contact_numbers_holder.onGlobalLayout {
|
||||||
|
contact_number.requestFocus()
|
||||||
|
showKeyboard(contact_number)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addNewEmailField() {
|
private fun addNewEmailField() {
|
||||||
val view = layoutInflater.inflate(R.layout.item_email, contact_emails_holder, false)
|
layoutInflater.inflate(R.layout.item_email, contact_emails_holder, false).apply {
|
||||||
updateTextColors(view as ViewGroup)
|
updateTextColors(this as ViewGroup)
|
||||||
setupEmailTypePicker(view.contact_email_type)
|
setupEmailTypePicker(contact_email_type)
|
||||||
contact_emails_holder.addView(view)
|
contact_emails_holder.addView(this)
|
||||||
|
contact_emails_holder.onGlobalLayout {
|
||||||
|
contact_email.requestFocus()
|
||||||
|
showKeyboard(contact_email)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deleteContact() {
|
private fun deleteContact() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user