Auto Search in Android app while fetching data fro

2019-04-13 01:52发布

问题:

Hi Guys, I want a similar searching functionality like Twitter,etc apps. User will enter text and as per the text entered, user should get the updated set of options to choose from. I am fetching data from external database for that. Currently I used a web-service and passed the data to be searched in it, which gives me relevant results. I am calling that web service on onTextChanged event of EditText. But this causes me to fire that web-service every time a letter has been added. Can someone suggest a more efficient solution, as it is not giving me results as fast as Twitter app. Every time I ping database for each letter entered, which causes delay in showing results.