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
163
votes
12 answers

Android search with Fragments

Does somebody know of a tutorial or an example of how to implement the standard Android search interface with Fragments? In other words, is it possible to put a standard search with a SearchManager in a Fragment?
Blackbelt
  • 148,780
  • 26
  • 271
  • 285
48
votes
9 answers

SearchView getActionView returning null

This was working a few days ago, but suddenly it stopped. I only want to use the action bar search widget when certain fragment is visible. Now I'm unable to get the SearchView, now getActionView always returns null. searchable.xml
Axxiss
  • 4,603
  • 4
  • 24
  • 43
36
votes
1 answer

When is it necessary to use singleTop launchMode in an android widget or application?

I just got burned by a widget. I could see the cause of the problem, but I could not determine why or its solution. My widget was issuing a search (SearchManager) and the activity launched a search dialog, but when it called-back to my widget, it…
mobibob
  • 8,030
  • 17
  • 76
  • 126
32
votes
5 answers

Android: How to detect click on custom SearchView element

I m creating a custom SearchView, but so far I didn't find a (click)event or listener, if the user clicks on the searchView widget. So SearchView is close, user clicks on the search Icon (which listener?!), SearchView is opened. See the picture…
longi
  • 10,071
  • 8
  • 51
  • 86
23
votes
3 answers

Search widget on action bar doesn't trigger my search activity

I'm developing search widget interface based on official tutorial: http://developer.android.com/guide/topics/search/search-dialog.html Problem: My SearchableActivity doesn't get triggered when I enter my query and press Ok/enter. Manifest for…
Indrek Kõue
  • 6,068
  • 7
  • 32
  • 66
21
votes
7 answers

SearchInfo always coming out null

I'm having trouble setting up the search view in the action bar. I followed the developer site, but it doesn't work. I get the feeling that I am missing something. When I run my code, it always outputs "failed to get searchable info"…
Kpaekn
  • 339
  • 3
  • 9
20
votes
1 answer

Android Actionbar Search widget implementation In ListFragment

I currently have my application set up with a ListFragment on the left and a DetailsFragment on the right (similar to the layout on the tablet below). On the action bar I have a search widget which when a search term is submitted should update the…
13
votes
5 answers

Android: getSearchableInfo(getComponentName()) returning null?

I'm trying to get suggestions for SearchView. I've implemented a custom content provider for it. I've also referred to this link to implement suggestions for the SearchView. The problem I'm facing is, I get null value on…
12
votes
2 answers

Multiple Choice Searchable ListView

OK I have a multiple choice ListView that works fine. I check the boxes for the contacts (held in a String[]) and can return the values fine. Because some people have a bunch of contacts I wanted to create a search bar kind of like the stock one…
burmat
  • 2,448
  • 1
  • 20
  • 28
12
votes
4 answers

Android Search Activity in Single Activity

I am trying to make my app consist a SINGLE activity. This activity should be able to create a search and also receive a search. Unfortunately, I am getting a "double" search bar in my SearchView when I click on the search button in the action…
Eric Cochran
  • 7,372
  • 5
  • 41
  • 77
11
votes
7 answers

Set search hint dynamically

Does anybody knows how to set android search dialog hint dynamically? T have try to do something like:
Boris
  • 111
  • 1
  • 3
10
votes
2 answers

SearchView in one activity, results in another one

My use case is the following: in activity A, I have an action bar with a collapsible SearchView. When the user gives her query and presses the 'search' button, I would like to show activity B with the results. I'm failing to do so, here is my…
wujek
  • 7,600
  • 9
  • 42
  • 72
10
votes
6 answers

Android SearchView on ActionBar, detect click on Search

In my application, like many other, there is a common search widget (http://developer.android.com/guide/topics/search/search-dialog.html#UsingSearchWidget). I would change fragment (and pass to it the term searched) only when the search button on…
rodi
  • 1,903
  • 5
  • 28
  • 55
9
votes
3 answers

Multiple SearchRecentSuggestionsProvider classes in Android app possible?

I have two different Search activities implemented with SearchManager in my app. One is the default searchable for the whole app and the other is used for only one activity. These two searches perform lookups of different data, and it doesn't make…
Marc Bernstein
  • 11,153
  • 5
  • 32
  • 32
9
votes
1 answer

How to search a string on google using default browser

I want to implement a search function that open the default browser and search the passed string public void searchOnGoogle(String keywords){ --- } Is there a way using intent filter or I must implement everything by myself?
AndreaF
  • 11,106
  • 24
  • 92
  • 156
1
2 3
10 11