Mark Khateeb
Mark Khateeb

Reputation: 917

Android instant live search

I am working on an application and I want to implement an instant search feature just like Facebook and Google+ when you use the search and it instantly fetch result and update them while your typing what are you looking for.

However, I am totally lost and couldn't find anything that may help. I am pretty sure (due to its speed) that it doesn't use the typical way of sending HTTP request from AsyncTask and waiting for response ... etc

does anybody knows how does this features work?

Upvotes: 1

Views: 414

Answers (1)

fweigl
fweigl

Reputation: 22028

Have a look at this class and this tutorial. The adapter from the second link or better yet it's getFilter() method already run asynchronous, so no need for an AsyncTask. You can use this template adapter to either retrieve suggestions from a web API or from suggestions from within your app, e.g. a database.

Upvotes: 2

Related Questions