Read More

Android: inflating search suggestions from network

In android, we can provide suggestions to user on serach. The custom suggestions are the suggestions that you provide the application rather than the suggestions based on user history.

So the data for the suggestions can be either from data of your application or from network. Here we are going to add the data from our network based on the input text in the search box. We are performing search using search dailog in action bar. Set up search in menu of your activity as:

Now set the searchable.xml file which we will store in res/xml folder

Now inflate the menu and add suggestions to your search dailog

And by this you can get your search suggestion from network.

. . .

Comments (3)

Add Your Comment

  • Disha S
    you saved my day girl !!
    • aastha gupta
      Thank you so much.
  • Vishal ;)
    lot of thanks …
  • css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again
    Close