Java – Set the predefined value to MultiAutoCompleteTextView : Android

Set the predefined value to MultiAutoCompleteTextView : Android… here is a solution to the problem.

Set the predefined value to MultiAutoCompleteTextView : Android

I

have to set some predefined values for MultiAutoCompleteTextView (before I select from the suggestion dropdown). It’s as if you selected 2-3 items from the drop-down list. After setting these predefined values, I want to continue the normal process of filtering from the list again and add it to MultiAutoCompleteTextView.

It looks like this

Predefined1, Predefined2, Predefined3,  

If I do setText(…) like I would with TextView or EditText, separating the values with some commas, it will treat it as 1 full word and add a comma ending.

Please suggest me how to implement it.

Edit:

Good. Let me explain in detail. I’m working on this and this Targets in . However, an additional requirement is that in addition to selecting values from the suggested dropdown, I need to set some predefined values when displaying the View, and when I write something and hit enter/hide the keyboard, anything I write should be converted to button text.
If that’s not possible, are there other options? Please make suggestions.

Edit:

enter image description here

These values should be in View without selecting from a drop-down list. After that, whichever users are added from the suggested drop-down list, those users should also be added to the list.

It’s like setting a prompt or some text to EditText before the user starts typing.

Thank you.

Related Problems and Solutions