improve phone number highlighting when it contains a dash

This commit is contained in:
tibbi 2019-01-05 21:50:34 +01:00
parent 8d12becafb
commit fd37c346e8
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.6.3'
implementation 'com.simplemobiletools:commons:5.6.4'
implementation 'joda-time:joda-time:2.10.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'

View File

@ -267,7 +267,7 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
}
val numberText = phoneNumberToUse?.value ?: ""
contact_number.text = if (textToHighlight.isEmpty()) numberText else numberText.highlightTextPart(textToHighlight, adjustedPrimaryColor)
contact_number.text = if (textToHighlight.isEmpty()) numberText else numberText.highlightTextPart(textToHighlight, adjustedPrimaryColor, false, true)
contact_number.setTextColor(textColor)
contact_number.setPadding(if (showContactThumbnails) smallPadding else bigPadding, 0, smallPadding, 0)
}