Twitter-like Android Autocomplete Textview

I want to implement a tweeter-like Android autocomplete list, but the existing Android Auto-complete Textview is not suitable for adding images to autocomplete suggestions. I need to download images and strings from the server and add to the suggestions box. I have added a link. Thanks.

enter image description here

+4
source share
1 answer
  • Create a filtered list of View, as shown in this topic .
  • Extend EditText to create a control that, when clicked, opens to receive new activity using the editText control and the list of filtered ones below.
  • Add the onTextChangedListener text to the edit text to filter the view.
  • Add onItemSelected Listener to listView. When an item is selected, close the dialog box and return the selected object
  • on Dialog cancel check, if the value already entered matches the value from the list, if yes returns the object, if it does not return null.

Hope this helps.

+1
source

Source: https://habr.com/ru/post/1392443/


All Articles