Solved

How to search data on a screen in Android

Posted on 2011-03-18
5
786 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
Introduction This article is a continuation of Part-1 as evident from the title. Please visit this page (http://www.experts-exchange.com/articles/18706/Backing-up-personal-data-on-your-Android-device-Part-1.html) to read the earlier Part -1. If y…
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.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now