Questions tagged [android-search]

Search is a core user feature on Android. Users should be able to search any data that is available to them, whether the content is located on the device or the Internet. To help create a consistent search experience for users, Android provides a search framework that helps you implement search for your application.

The search framework offers two modes of search input: a search dialog at the top of the screen or a search widget (SearchView) that you can embed in your activity layout. In either case, the Android system will assist your search implementation by delivering search queries to a specific activity that performs searchs. You can also enable either the search dialog or widget to provide search suggestions as the user types. Figure 1 shows an example of the search dialog with optional search suggestions.

Once you've set up either the search dialog or the search widget, you can:

  • Enable voice search
  • Provide search suggestions based on recent user queries
  • Provide custom search suggestions that match actual results in your application data
  • Offer your application's search suggestions in the system-wide Quick Search Box

The following documents show you how to use Android's framework to implement search:

Creating a Search Interface:

How to set up your application to use the search dialog or search widget.

Adding Recent Query Suggestions:

How to provide suggestions based on queries previously used.

Adding Custom Suggestions:

How to provide suggestions based on custom data from your application and also offer them in the system-wide Quick Search Box.

Searchable Configuration:

A reference document for the searchable configuration file (though the other documents also discuss the configuration file in terms of specific behaviors).

413 questions
0
votes
1 answer

Action Bar on Android is a Singleton?

When we are working with the Search Widget in Android and create multiple times, maybe, search widgets in order to know what was written... does the action bar works like a layer? Is ever the same action bar no matter in which activity I am?
0
votes
2 answers

Hide keyboard after actionbar search

In my application I have an actionbar activity that holds multiple fragments. In the activity when I do search the results are shown in a new fragment. I have tried hiding the keyboard after I click the submit button without any luck. Here is my…
0
votes
0 answers

Confusions about implementing a SearchView with online suggestions

I am implementing a SearchView on ActionBar with ActionBarSherlock. I went through the documentation on this topic: http://developer.android.com/guide/topics/search/index.html but I am confused: (1) It seems the framework pushes you to use…
darklord
  • 5,077
  • 12
  • 40
  • 65
0
votes
1 answer

searchSuggestThreshold attribute doesn't work : ContentProvider triggered on every typed character

I have a search widget within the action bar of my main activity. I would like to display suggestions after the user type at least 2 characters. I'm aware this can be done by setting android:searchSuggestThreshold="2", but it doesn't seem to work…
0
votes
2 answers

Google play store android api?

In my android application, I want to show list of applications made by a specific company and exist in play store.But I am not finding any api to perform search with some keyword. Any web APIs are available for searching on Google Play store? what…
sappu
  • 6,665
  • 4
  • 19
  • 18
0
votes
0 answers

How to search a item in the dynamic ListView in android?

I'm trying to develop a search function on a list of items by using adapter class. How to use search functionality in listview when listview get all item dyanamically from php-mysql database via json webservice. I have post my completed code on…
0
votes
2 answers

Search functionality Within List View in Android

I'm pretty new to android. I'm trying to develop a search function on a list of items by using arrayadapter as shown below. but search is not working correctly. plz plz help me Here is my code.. AddToOutlet.java public class AddToOutlet…
Amardeepvijay
  • 1,626
  • 3
  • 17
  • 47
0
votes
0 answers

Remove searchIcon

I want to remove the search icon in the hint-field of the searchView (see image attached). I've tried multiple solutions, in particular this: int magId = getResources().getIdentifier("android:id/search_mag_icon", null, null); ImageView magImage =…
Filnik
  • 1,023
  • 3
  • 13
  • 26
0
votes
1 answer

Highlight buttons on search

I am trying to implement search functionality in android to search for buttons. Usually, search is used to search listviews but I want to use it to search buttons. I have 118 buttons in my activity and there is an edittext(Search bar) on the top. …
Chinmay Dabke
  • 5,070
  • 11
  • 40
  • 63
0
votes
0 answers

How to get text from SearchView in Cursor

Ive succesfully put search-suggestions to my app and right now do i need to find out, how to get the typed text from SearchView to my Cursor. I know onQueryTextChange(String) method, but how do i get the text right in my contentprovider class?
0
votes
1 answer

How to show data after Intent.ACTION_VIEW?

I'm creating search for my app and one of the last things I need to do is to "extract" the data when the user clicks on search-suggestion. Ive set Intent.ACTION_VIEW and got data by intent.getData(); in my searchable activity. But what should i do…
marson
  • 913
  • 10
  • 32
0
votes
1 answer

Android: Search-Suggestions does wrong Intent

I am trying to create custom suggestions to my app. It works well, but right now am I trying to solve one problem. I've set android:searchSuggestIntentAction="android.intent.action.VIEW" and in AndroidManifest
0
votes
0 answers

Way to get ParseObjects to custom Search suggestions in Android

I want to ask, if is there some way to get ParseObjects to Search suggestions-box in Android. I've succesully created recent-query suggestions and it worked well. But right now do I need to put there one string collection from Parse.com while the…
0
votes
1 answer

How to get objects independently on text case

I've added search to my code and now am I wondering about one thing. I'm using Parse.com's method: query.whereContains("my_strings_from_Parse", text_from_EditText.toLowerCase()) I've made the text from EditText to lower-case bur right now do i need…
marson
  • 913
  • 10
  • 32
0
votes
3 answers

SearchView onQueryTextSubmit - strange issue

I have a strange issue. Only thing when the text in the SearchView is submitted,i just want to do move to another Activity. But what actually happens here,when i submit it, near around 1 to 5 sec it starts the main Activity again. I've tried to…