Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 18.104.22.168 release ready!
Owner and Founder. Opencart
Searching in android is a very important feature and mostly present in every application nowadays. There are two ways to provide the search one is search widget and the other is or a search dailog.
We can also show the suggestions to user in the search view. The suggestions can be the recent search items or the custom suggestions you added in your application.
Here we will implement a search dialog with the recently searched terms as sugessions. Firstly we have to implement a searchable configuration. Here is your searchable.xml
Place this xml at res/xml folder of your application.
Now make a search activity that will be called internally when a search is performed. The activity should be single top. Lets call it SearchActivity
To make the system know which one of your activity is search activity. So define your search activity within th manifest as
Now to store your recent searches for suggestion make a authority provider as we have already defined in Searchable.xml i.e MySuggestionProvider
You can also use DATYABASE_MODE_2LINES, it is helpful in showing a descriptive text below your suggestion text. The search is matched with both the suggestion text as well as descriptive text.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.