Questions tagged [android-searchmanager]

Search Manager Class Provides access to the system search services.

Search Manager class provides access to the system search services.

In practice, you won't interact with this class directly, as search services are provided through methods in Activity and the ACTION_SEARCH Intent. If you do require direct access to the SearchManager, do not instantiate this class directly. Instead, retrieve it through context.getSystemService(Context.SEARCH_SERVICE).

Useful links

154 questions
3
votes
4 answers

Reset Search in SearchView when you click on back

I added Search menu item to filter my list. Everything is working fine with filtering and reset filter. But I cannot find a way to reset the filter when user click on back button. Actually when user add some text in search field, the first back…
bunjeeb
  • 1,096
  • 1
  • 17
  • 32
3
votes
2 answers

How to add extra data to android.widget.SearchView?

I have defined my SearchView like this @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { super.onCreateOptionsMenu(menu, inflater) SearchManager searchManager = (SearchManager)…
Martynas Jurkus
  • 9,231
  • 13
  • 59
  • 101
3
votes
2 answers

Android Search Activity and android:launchMode="singleTop"

I have a single activity in my app that uses a SearchView to search (see manifest-- the search intent is intercepted). However, when I press search, nothing happens. The activity never re-starts itself. So, I removed android:launchMode="singleTop"…
Eric Cochran
  • 8,414
  • 5
  • 50
  • 91
3
votes
3 answers

How can I programatically hide or suppress the search suggestions list?

How can I programatically hide the list of suggestions that pops up up below the SearchView? There are times when I'd like the SearchView to not be inconified and to not have focus. I can do this both using the setIconified(false) and the…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
3
votes
1 answer

How can I prevent both the keyboard and the menu from being shown together?

Here's a screenshot of my application. When the search box is clicked, the soft-keyboard automatically pops up, which is fine, but, if I also press the "Menu" button, the menu appears on top of the soft-keyboard. How can I show the menu but…
2
votes
4 answers

Problem passing a Bundle with onSearchRequested

I'm actually trying to use the built-in search interface of Android, but I have some issues when I try to pass data with the search query. Here is a brief explanation : I have an object in a first Activity (FirstActivity) called "Category" which…
Lyrkan
  • 1,063
  • 10
  • 18
2
votes
2 answers

Android search activity not starting

My search box is not displaying when I press the search button on my Android phone. What I want to do is do an ASyncTask (or background task) to get a JSON response of an array of strings (names of people), search through the result, and display it…
2
votes
1 answer

How can I finish the current activity when performing a search in Android?

I have search functionality in my app. When the search bar is invoked from a "show activity" and the user performs a search, I want to finish the show activity and take the user to the search activity. Is there a way to know if…
Gunnar Lium
  • 6,023
  • 9
  • 35
  • 33
2
votes
2 answers

searchview not gain focus but keyboard opens

i m using searchview for search functionality my problem is that when i click on search icon keyboard gets opened but searchview does not get focus below is my code menu.xml
Hardik Mehta
  • 867
  • 1
  • 12
  • 20
2
votes
2 answers

How to handle callback from Search Manager?

Let's assume the following: Activity A calls Search Manager User searches, and search results are displayed in Activity B User clicks on a list item in Activity B App switches back to Activity A I am unable to handle this callback from Activity B…
Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
2
votes
0 answers

Update cursor for Android Search Suggestions ContentProvider asynchronously

I am using a ContentProvider to provide search suggestions for a Searchable Configuration in my app. I successfully receive query calls and when I create a MatrixCursor, add several rows, and return the cursor, they are properly displayed in the…
dcarr622
  • 1,576
  • 4
  • 15
  • 23
2
votes
2 answers

Search intent not received by current activity

I am implementing an activity where I want to add a search bar. I want the current activity to receive the intent back. I followed couple of examples available and have added following code in my application: AndroidManifest.xml
Keya
  • 859
  • 3
  • 9
  • 17
2
votes
2 answers

Why doesnt collapseActionView() close SearchView

I have an Android application that employs an ActionBar SearchView Everything works fine when requesting a search, the search icon expands to allow text entry, the softkeyboard appears, i enter a query string and this is passed to my designated…
Hector
  • 4,016
  • 21
  • 112
  • 211
2
votes
2 answers

Call google search from android app

Is there a way I can call Google search which from an app? passing it the query string? I have an app where users type in text and press a button after which i search and/or process the string. for some part I have to pass the string to the search…
Arjun Ramesh
  • 189
  • 1
  • 12
2
votes
0 answers

Android SearchDialog - Disable spell-check/suggestions?

I'm using a SearchDialog in my Android app. Is there any way to force-disable the autocompletion/spell-checker/suggestions? My search really doesn't need it - most of the words my users will be searching for don't exist in a dictionary. I couldn't…
Rowan Freeman
  • 15,724
  • 11
  • 69
  • 100