mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-20 05:20:56 +01:00
highlight contact number from the search query
This commit is contained in:
parent
980368addd
commit
3e8a65bda1
@ -103,7 +103,7 @@ class DialpadActivity : SimpleActivity() {
|
|||||||
it.cleanPhoneNumbers.any { (text.isNotEmpty() && it.value.contains(text)) || (numericOnly.isNotEmpty() && it.value.contains(numericOnly)) }
|
it.cleanPhoneNumbers.any { (text.isNotEmpty() && it.value.contains(text)) || (numericOnly.isNotEmpty() && it.value.contains(numericOnly)) }
|
||||||
} as ArrayList<Contact>
|
} 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)
|
callContact(it as Contact)
|
||||||
}.apply {
|
}.apply {
|
||||||
addVerticalDividers(true)
|
addVerticalDividers(true)
|
||||||
|
@ -29,12 +29,12 @@ import java.util.*
|
|||||||
|
|
||||||
class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Contact>, private val refreshListener: RefreshContactsListener?,
|
class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Contact>, private val refreshListener: RefreshContactsListener?,
|
||||||
private val location: Int, private val removeListener: RemoveFromGroupListener?, recyclerView: MyRecyclerView,
|
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) {
|
MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick) {
|
||||||
|
|
||||||
private lateinit var contactDrawable: Drawable
|
private lateinit var contactDrawable: Drawable
|
||||||
private var config = activity.config
|
private var config = activity.config
|
||||||
private var textToHighlight = ""
|
private var textToHighlight = highlightText
|
||||||
|
|
||||||
var adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
|
var adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
|
||||||
var startNameWithSurname: Boolean
|
var startNameWithSurname: Boolean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user