Dynamic updating autocompletetextview with remote mysql data
//Filter based on the current text because api call is asynchronous.Filter().filter(autocomplete Text Text(), null); There was a pretty good tutorial on this topic using remote data in the Google Map API to populate a Auto Complete Text View here.Basically whenever i type, i am calling php sending the input and php will query database and return the values(in my case just names) that have “input” as substring (like if i type ‘pa’ then it would return names that have ‘pa’ as substring). Whatever, i just wrote a stupid trick to remove any filter, actually instead of technically removing filter i am adding a filter which does a job to show all suggestions : D. So now your are getting results suggestion from database dynamically to Auto Complete Text View.
This code clears the adapter, and adds the new data as you'd expect. map : completions) //Force the adapter to filter itself, necessary to show new data.This post describes how to use Android List View custom adapter.In the last post, we talked about how we can interact with the user handling the item click events and the long click events.The first approach if you consider, the response time and delay is high and user may or may not get search suggestions for entered query.Here, i considered second approach for autocomplete search suggestions as my data is some few records.