diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/adapters/ContactsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/adapters/ContactsAdapter.kt index 178ace72..e2514ef6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/adapters/ContactsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/adapters/ContactsAdapter.kt @@ -31,13 +31,14 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: MutableList Unit) : MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick) { - lateinit private var contactDrawable: Drawable + private lateinit var contactDrawable: Drawable var config = activity.config 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() + + private var smallPadding = activity.resources.getDimension(R.dimen.small_margin).toInt() + private var bigPadding = activity.resources.getDimension(R.dimen.normal_margin).toInt() init { initDrawables() @@ -192,10 +193,12 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: MutableList if (selectedContacts.contains(contact.id.toString())) { @@ -76,7 +80,7 @@ class SelectContactsAdapter(val activity: SimpleActivity, val contacts: List Unit)?) : RecyclerView.ViewHolder(view) { - fun bindView(contact: Contact, startNameWithSurname: Boolean, contactDrawable: Drawable, config: Config): View { + fun bindView(contact: Contact, startNameWithSurname: Boolean, contactDrawable: Drawable, config: Config, showContactThumbnails: Boolean, + smallPadding: Int, bigPadding: Int): View { itemView.apply { contact_checkbox.beVisibleIf(showCheckbox) contact_checkbox.setColors(config.textColor, context.getAdjustedPrimaryColor(), config.backgroundColor) @@ -92,8 +97,12 @@ class SelectContactsAdapter(val activity: SimpleActivity, val contacts: List diff --git a/app/src/main/res/layout/item_add_favorite_without_number.xml b/app/src/main/res/layout/item_add_favorite_without_number.xml index cc142472..ef21a1f7 100644 --- a/app/src/main/res/layout/item_add_favorite_without_number.xml +++ b/app/src/main/res/layout/item_add_favorite_without_number.xml @@ -25,27 +25,20 @@ diff --git a/app/src/main/res/layout/item_contact_with_number.xml b/app/src/main/res/layout/item_contact_with_number.xml index bce7b037..7f29b5ca 100644 --- a/app/src/main/res/layout/item_contact_with_number.xml +++ b/app/src/main/res/layout/item_contact_with_number.xml @@ -31,8 +31,6 @@ android:layout_toRightOf="@+id/contact_tmb" android:ellipsize="end" android:maxLines="1" - android:paddingLeft="@dimen/small_margin" - android:paddingTop="@dimen/small_margin" android:textSize="@dimen/normal_text_size" tools:text="John Doe"/> @@ -44,7 +42,6 @@ android:layout_below="@+id/contact_name" android:layout_toRightOf="@+id/contact_tmb" android:maxLines="1" - android:paddingLeft="@dimen/small_margin" android:textSize="@dimen/normal_text_size" tools:text="0123 456 789"/> diff --git a/app/src/main/res/layout/item_contact_without_number.xml b/app/src/main/res/layout/item_contact_without_number.xml index b87ca0a2..fc5eee9e 100644 --- a/app/src/main/res/layout/item_contact_without_number.xml +++ b/app/src/main/res/layout/item_contact_without_number.xml @@ -31,8 +31,6 @@ android:ellipsize="end" android:gravity="center_vertical" android:maxLines="1" - android:paddingLeft="@dimen/small_margin" - android:paddingTop="@dimen/small_margin" android:textSize="@dimen/bigger_text_size" tools:text="John Doe"/>