Search bar using ActionBarSherlock

Hello friends…

Before we start, just refer “How to setup ActionBarSherlock in Android Project” and start implementing “Search bar using ActionBarSherlock”.

Steps to create Search bar using ActionBarSherlock:

  • In the above ManiActivity.java file, we are implementing listview for showing student information for searching text using search bar in ActionBarSherlock. Also we implement TextWatcher in that class.
  • Now we need to implement and paste below code in ListViewAdapter.java

  • In the above ListViewAdapter.java files we implement adapter for student info.
  • Now we need to implement and paste below code in Student.java class

  • Now we need to implement activity_main.xml for implementation of searchbar using ActionBarSherlock.

  • Now we are going to implement layout_searchbar.xml for putting searchbar in ActionBarSherlock.


 

  • Now we are going to implement listview_item.xml for showing list items in a listview for searching.

  • Now your output will looks like…

output

 

If you have found this Tutorial useful please share it in your circle.


You can download this tutorial code for free !!!

For any trouble with the code, don’t forget to put the comment.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *