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
3
votes
0 answers

Understanding android.permission.GLOBAL_SEARCH uses

I am trying to figure out the use of android.permission.GLOBAL_SEARCH documentation does not provide any useful information. What I am trying to achieve and where I am confused? IMO this permission may allow the system app (that search widgets on…
Ali
  • 31
  • 1
3
votes
1 answer

How do I allow search in android that works with character accents aswell?

I have implemented a search mechanism in my app, such that when I search for a name or email, it displays the string with the matching character. However, there are some accented strings in my list and when I search with a regular character…
user11455292
3
votes
1 answer

How to fix "Cancel & Voice button on left" in RTL Search Bar

I developed an RTL android app. I implemented an Actionbar that contains a Search bar. but the Cancel and Voice button are on the right of the text. As you know, the cancel and voice button must be on the left of the text in RTL. Notice: I've…
3
votes
1 answer

Getting wrong element when searching second time in MaterialSearchView

I'm using the MaterialSearchView library. When I search for the first time, the correct elements are returned. If I click on the first result, the correct element is selected and the itemName is printed out in the logcat. If I search again for…
Johans Bormman
  • 855
  • 2
  • 11
  • 23
3
votes
0 answers

SearchView using PageKeyedDataSource Not Displaying any result or even errors

I am trying to create a searchview inside a fragment that on search requests data from backend api , The results are paginated so I use PageKeyedDataSource to show results in recycler view . So when I perform Search Query , It shows nothing as…
3
votes
1 answer

Android searchable configuration voice search language

I am implementing voice search in my activity using searchable configuration as defined here. However setting android:voiceLanguage="tr" doesn't seem to work if the locale of the device is different. The search application dialog opens in device's…
rahimli
  • 1,373
  • 11
  • 25
3
votes
2 answers

What is Searchable configuration, searchable activity?

I am designing a simple search feature for my application, I have Successfully created a search icon on the toolbar of my screen. Now I'm having problems in implementing brains (working) behind the search feature Through Android's official…
black sheep 369
  • 564
  • 8
  • 19
3
votes
0 answers

Invisible Text in SearchView

I've the following layout for an Activity:
3
votes
1 answer

Cannot submit query with SearchView

I use following code snippets to enable the search functionality to my toolbar in the HomeActivity. When I enter a query, the application should take me to the NearbySearchActivity, where I will see the results. I can see the toolbar, click on the…
Joeri Verlooy
  • 613
  • 5
  • 19
3
votes
2 answers

How to show search view recent search history

I tried to using following ways but unable to show recent search history Create "history" to SearchView on ActionBar Implementing SearchView in action bar kindly help how to create and show recent search in serachview searchable xml
3
votes
0 answers

Expandable Search in Android

Duplicate of this closed question: How to implement Search Bar like gmail app in android? I've been trying to implement expandable search that is displayed and implemented in the current YouTube and Photos Android application among others but I have…
John61590
  • 1,106
  • 1
  • 13
  • 29
3
votes
1 answer

SearchVIew: empty suggestion list

I am newbie.. I need your help with suggestion for SearchView. Data from maps.google.com/maps/api/geocode recived and parced. Everything looks ok. But why there is no text in suggestions? Please help me understand whats wrong... JsonParser…
3
votes
0 answers

Update cursor returned by ContentProvider.query() for android TV search

I'm implementing search in my app and using a ContentProvider to provide search suggestions for that. I'm doing everything like here: https://developer.android.com/training/tv/discovery/searchable.html My implementation is based on…
3
votes
0 answers

What is the 'SearchableActivity.JARGON' boolean variable in Android?

@Override public boolean onSearchRequested() { Bundle appData = new Bundle(); appData.putBoolean(SearchableActivity.JARGON, true); startSearch(null, false, appData, false); return true; } I have taken this snippet form this…
Solace
  • 8,612
  • 22
  • 95
  • 183
3
votes
1 answer

Clear Searchview Text on navigation.

I have an Activity with two child fragments Timeline and Milestones. Both these fragments contain listviews populated by a custom Cursor adapter Here is a graphical Representation: Now when I am on TIMELINE and I open up the searchview, I type…
Skynet
  • 7,820
  • 5
  • 44
  • 80