How to search data on a screen in Android

Hey,

       I was wondering if there was a "SearchView" on the Android, common logic says yes... mainly because it was built by Google... but I haven't found anything called "SearchView", is it called something else? Or is there a widget we can put in our app to do the same thing?

Appreciate any help on this!
errangAsked:
Who is Participating?
 
Dejan PažinConnect With a Mentor Head of SW DevelopmentCommented:

Depends on how you work with gui. Personally, I define everything in the Java code, but thats just because thats how I like it. Google propagates defining gui elements in the xml layout files.

I simply find it easier and more productive by defining them in Java code.
0
 
Dejan PažinHead of SW DevelopmentCommented:

Actually, there is a class called SearchView:

http://developer.android.com/reference/android/widget/SearchView.html

Is that what you were looking for?
0
 
errangAuthor Commented:
Hm... Yea, so is this implemented only on the java side? Or are there any XML elements I need to worry about?
0
 
errangAuthor Commented:
Could you please give me a little hello world snippet? Even if its pseudocode?
0
 
Dejan PažinHead of SW DevelopmentCommented:

The best place to see the demo code are samples provided by Google. You should follow the tutorial on how to get the samples here:

http://d.android.com/resources/samples/get.html

That's exactly how I learned Android programming, the samples are actually very good. There are some examples on SearchView:

http://d.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/SearchViewFilterMode.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.