mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
make sure the contact list items have proper height even without thumbnail
This commit is contained in:
@ -36,6 +36,8 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: MutableList<Co
|
||||
var startNameWithSurname: Boolean
|
||||
var showContactThumbnails: Boolean
|
||||
var showPhoneNumbers: Boolean
|
||||
var smallPadding = activity.resources.getDimension(R.dimen.small_margin).toInt()
|
||||
var bigPadding = activity.resources.getDimension(R.dimen.normal_margin).toInt()
|
||||
|
||||
init {
|
||||
initDrawables()
|
||||
@ -190,8 +192,10 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: MutableList<Co
|
||||
view.apply {
|
||||
contact_name.text = contact.getFullName(startNameWithSurname)
|
||||
contact_name.setTextColor(textColor)
|
||||
contact_name.setPadding(if (showContactThumbnails) smallPadding else bigPadding, smallPadding, 0, 0)
|
||||
contact_number?.text = contact.phoneNumbers.firstOrNull()?.value ?: ""
|
||||
contact_number?.setTextColor(textColor)
|
||||
contact_number?.setPadding(if (showContactThumbnails) smallPadding else bigPadding, 0, 0, 0)
|
||||
contact_tmb.beVisibleIf(showContactThumbnails)
|
||||
|
||||
if (showContactThumbnails) {
|
||||
|
Reference in New Issue
Block a user