highlight contact number from the search query

This commit is contained in:
tibbi 2018-09-25 14:17:55 +02:00
parent 980368addd
commit 3e8a65bda1
2 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ class DialpadActivity : SimpleActivity() {
it.cleanPhoneNumbers.any { (text.isNotEmpty() && it.value.contains(text)) || (numericOnly.isNotEmpty() && it.value.contains(numericOnly)) }
} as ArrayList<Contact>
ContactsAdapter(this, filtered, null, LOCATION_DIALPAD, null, dialpad_list, dialpad_fastscroller) {
ContactsAdapter(this, filtered, null, LOCATION_DIALPAD, null, dialpad_list, dialpad_fastscroller, text) {
callContact(it as Contact)
}.apply {
addVerticalDividers(true)

View File

@ -29,12 +29,12 @@ import java.util.*
class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Contact>, private val refreshListener: RefreshContactsListener?,
private val location: Int, private val removeListener: RemoveFromGroupListener?, recyclerView: MyRecyclerView,
fastScroller: FastScroller, itemClick: (Any) -> Unit) :
fastScroller: FastScroller, highlightText: String = "", itemClick: (Any) -> Unit) :
MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick) {
private lateinit var contactDrawable: Drawable
private var config = activity.config
private var textToHighlight = ""
private var textToHighlight = highlightText
var adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
var startNameWithSurname: Boolean