I'm trying to create a custom view, a mix between Spinner and AutoCompleteEditText.
(It should also allow the user to add items and returns an object).
I would like to avoid strange behavior of AutoCompleteEditText.
I try to explain (difficult!).
If the user selects an item (ITEM_CLICK) the AutoCompleteEditText.Text is filled with the selected text and the cursor is on the right of the text.
If, at this point, I use the command "ShowDropDown" to show the list (the user presses the button with the classic inverted triangle), the list is regularly and fully displayed.
If, however, the code sets the text of AutoCompleteEditText, text that is an item of the list (added by the user), the command ShowDropDown shows only that item.
If you launch the app (preferably step by step) and read the few comments, you will understand better.
Thank you in advance, although I fear that the solution is difficult.
(It should also allow the user to add items and returns an object).
I would like to avoid strange behavior of AutoCompleteEditText.
I try to explain (difficult!).
If the user selects an item (ITEM_CLICK) the AutoCompleteEditText.Text is filled with the selected text and the cursor is on the right of the text.
If, at this point, I use the command "ShowDropDown" to show the list (the user presses the button with the classic inverted triangle), the list is regularly and fully displayed.
If, however, the code sets the text of AutoCompleteEditText, text that is an item of the list (added by the user), the command ShowDropDown shows only that item.
If you launch the app (preferably step by step) and read the few comments, you will understand better.
Thank you in advance, although I fear that the solution is difficult.
Attachments
Last edited: