For my app, I need to add a suggestion feature when typing, I have used AppCompatAutoCompleteTextView and it works fine but I am struggling on 3 things:
When the user is typing, is there is no match in the suggestion, I would like a default text to be suggested. for example, you type jkdjfdkl and it shows automatically Other
<string-array name="feedback_topic_array">
<item>App Features</item>
<item>App Experience</item>
<item>Other</item>
</string-array>
the other point is, when the user tap App it will suggest the 2 first item and it's fine but I would like to be able to set the word App in the suggested item in bold.
I have implemented this code:
binding.topicEt.apply {
threshold = 0
val suggestAdapter = ArrayAdapter(context, android.R.layout.simple_dropdown_item_1line, resources.getStringArray(R.array.feedback_topic_array) )
setAdapter(suggestAdapter)
showDropDown()
// performCompletion()
}
but it's not setting the default value when no match
Any idea ?