Skip to content

Commit b5d760a

Browse files
committed
Rename AutoFill to AutoComplete
1 parent 45bb46f commit b5d760a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/EditContactActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class EditContactActivity : ContactActivity() {
259259

260260
val nameTextViews = arrayOf(contact_first_name, contact_middle_name, contact_surname).filter { it.isVisible() }
261261
if (nameTextViews.isNotEmpty()) {
262-
setupAutofill(nameTextViews)
262+
setupAutoComplete(nameTextViews)
263263
}
264264

265265
updateTextColors(contact_scrollview)
@@ -1535,7 +1535,7 @@ class EditContactActivity : ContactActivity() {
15351535
else -> Im.PROTOCOL_CUSTOM
15361536
}
15371537

1538-
private fun setupAutofill(nameTextViews: List<MyAutoCompleteTextView>) {
1538+
private fun setupAutoComplete(nameTextViews: List<MyAutoCompleteTextView>) {
15391539
ContactsHelper(this).getContacts { contacts ->
15401540
val adapter = AutoCompleteTextViewAdapter(this, contacts)
15411541
val handler = Handler(mainLooper)
@@ -1556,7 +1556,7 @@ class EditContactActivity : ContactActivity() {
15561556
}
15571557
view.doAfterTextChanged {
15581558
handler.postDelayed({
1559-
adapter.enableAutoFill = true
1559+
adapter.autoComplete = true
15601560
adapter.filter.filter(it)
15611561
}, AUTO_FILL_DELAY)
15621562
}

app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/AutoCompleteTextViewAdapter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import kotlinx.android.synthetic.main.item_autocomplete_name_number.view.item_au
2525
class AutoCompleteTextViewAdapter(
2626
val activity: SimpleActivity,
2727
val contacts: ArrayList<Contact>,
28-
var enableAutoFill: Boolean = false
28+
var autoComplete: Boolean = false
2929
) : ArrayAdapter<Contact>(activity, 0, contacts) {
3030
var resultList = ArrayList<Contact>()
3131

@@ -76,7 +76,7 @@ class AutoCompleteTextViewAdapter(
7676
val filterResults = FilterResults()
7777
if (constraint != null) {
7878
resultList.clear()
79-
if (enableAutoFill) {
79+
if (autoComplete) {
8080
val searchString = constraint.toString().normalizeString()
8181
contacts.forEach {
8282
if (it.getNameToDisplay().contains(searchString, true)) {

0 commit comments

Comments
 (0)