Solved

How to search data on a screen in Android

Posted on 2011-03-18
5
790 Views
Last Modified: 2012-05-11
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!
0
Comment
Question by:errang
  • 3
  • 2
5 Comments
 
LVL 17

Expert Comment

by:Dejan Pažin
ID: 35165831

Actually, there is a class called SearchView:

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

Is that what you were looking for?
0
 

Author Comment

by:errang
ID: 35166877
Hm... Yea, so is this implemented only on the java side? Or are there any XML elements I need to worry about?
0
 
LVL 17

Accepted Solution

by:
Dejan Pažin earned 500 total points
ID: 35167328

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
 

Author Closing Comment

by:errang
ID: 35169912
Could you please give me a little hello world snippet? Even if its pseudocode?
0
 
LVL 17

Expert Comment

by:Dejan Pažin
ID: 35170484

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MITM attack on Android phones 8 121
How to Implement Two Event Listeners in Android 2 45
see android hidden files 10 98
How to export SQL to firebase ? 7 68
First off, some of you reading this are already thinking there is an error in the title. It really should be Kindle Fire versus OTHER Android tablets. That's because the Amazon Kindle Fire IS an Android tablet. Well, it is and it's not. It's running…
Often, people trade privacy and security for convenience. However in today's concrete jungle, this is an extremely foolish decision considering the vast amount of technologies being used against consumer interest. First off, I won't waste any time e…
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question