diff --git a/app/build.gradle b/app/build.gradle index 6bb173eb..ddec97b4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:6f69c8c105' + implementation 'com.github.SimpleMobileTools:Simple-Commons:35d685c042' implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt index 311dca86..b001c1f6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt @@ -13,9 +13,9 @@ import android.view.Menu import android.view.MotionEvent import android.view.View import android.view.ViewGroup -import android.widget.FrameLayout import android.widget.ImageView import android.widget.TextView +import androidx.constraintlayout.widget.ConstraintLayout import androidx.recyclerview.widget.ItemTouchHelper import androidx.recyclerview.widget.RecyclerView import com.bumptech.glide.Glide @@ -28,12 +28,11 @@ import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* -import com.simplemobiletools.commons.helpers.ContactsHelper import com.simplemobiletools.commons.interfaces.ItemMoveCallback import com.simplemobiletools.commons.interfaces.ItemTouchHelperContract import com.simplemobiletools.commons.interfaces.StartReorderDragListener import com.simplemobiletools.commons.models.RadioItem -import com.simplemobiletools.commons.models.contacts.Contact +import com.simplemobiletools.commons.models.contacts.* import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.contacts.pro.R import com.simplemobiletools.contacts.pro.activities.SimpleActivity @@ -43,7 +42,6 @@ import com.simplemobiletools.contacts.pro.extensions.* import com.simplemobiletools.contacts.pro.helpers.* import com.simplemobiletools.contacts.pro.interfaces.RefreshContactsListener import com.simplemobiletools.contacts.pro.interfaces.RemoveFromGroupListener -import com.simplemobiletools.commons.models.contacts.* import java.util.* class ContactsAdapter( @@ -371,7 +369,8 @@ class ContactsAdapter( private fun setupView(view: View, contact: Contact, holder: ViewHolder) { view.apply { - findViewById(R.id.item_contact_frame)?.isSelected = selectedKeys.contains(contact.id) + setupViewBackground(activity) + findViewById(R.id.item_contact_frame)?.isSelected = selectedKeys.contains(contact.id) val fullName = contact.getNameToDisplay() findViewById(R.id.item_contact_name).text = if (textToHighlight.isEmpty()) fullName else { if (fullName.contains(textToHighlight, true)) {