adding some placeholders if no contacts have been found
This commit is contained in:
parent
078e8c4f14
commit
e8205c7c44
4 changed files with 44 additions and 1 deletions
|
|
@ -34,6 +34,12 @@ class NewConversationActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
no_contacts_placeholder_2.setTextColor(getAdjustedPrimaryColor())
|
||||
no_contacts_placeholder_2.underlineText()
|
||||
}
|
||||
|
||||
private fun initContacts() {
|
||||
if (isThirdPartyIntent()) {
|
||||
return
|
||||
|
|
@ -80,6 +86,11 @@ class NewConversationActivity : SimpleActivity() {
|
|||
}
|
||||
|
||||
private fun setupAdapter(contacts: ArrayList<Contact>) {
|
||||
val hasContacts = contacts.isNotEmpty()
|
||||
contacts_list.beVisibleIf(hasContacts)
|
||||
no_contacts_placeholder.beVisibleIf(!hasContacts)
|
||||
no_contacts_placeholder_2.beVisibleIf(!hasContacts)
|
||||
|
||||
ContactsAdapter(this, contacts, contacts_list, null) {
|
||||
hideKeyboard()
|
||||
launchThreadActivity((it as Contact).phoneNumber, it.name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue