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
2
votes
1 answer

Elements in Relative Layout showing differently when the app runs

I have a ListView created inside a fragment, and it has a search filter, the problem is XML layout showing fine in android studio but when running in the emulator or phone it's showing differently (not properly as I aligned) and also when I click…
2
votes
0 answers

Parse.com : How to Adding a search filter for a Parse ListView inside inside a Fragment

I'm trying to add a Search filter for a ListView which is inside a tab fragment . the data is called from parse server using and adapter . my fragment java file is below SportsCar.java import android.os.Bundle; import android.text.Editable; import…
2
votes
4 answers

Android : How to create TabLayout with drawable for count textview?

I'm trying to use the new TabLayout in the android design library I wanted to create a TextView having drawable as background on a tab of TabLayout. For example I search Los Angeles in Search box I should get number of Books,Movie,Place in the…
Nikhil
  • 31
  • 1
  • 3
2
votes
0 answers

How can i use this library on API 16 in Android

I want use this library for searchBar in my application : See Link This library minSDK has 16 and when run this library on SDK 16 and 17 and click on EditText (for write worlds) not show my any text and just show white screen (in editText) but when…
2
votes
2 answers

Listview filter adapter.getFilter().filter(by more than one value)

I have created a list view in android and I already implement search filter by using searchview and charsequence as parameter like this searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { @Override …
2
votes
1 answer

Cannot resolve constructor ArrayAdapter (saveourcar.soc.Insurance,int,int, java.lang.String[],java.lang.Integer[])

I have made an application that has a list of insurance companies using a listView. The listView is populated using an array. I can currently search through this list using a filter. However beside each item in the listView I want an image, I can do…
2
votes
2 answers

Unexpected Intent with action WEB_SEARCH

I have pretty large app to inspect with a lot of activities. One of most popular exceptions is No Activity found to handle Intent { act=android.intent.action.WEB_SEARCH (has extras) } What the heck? I don't see in code any "WEB_SEARCH"…
snachmsm
  • 17,866
  • 3
  • 32
  • 74
2
votes
0 answers

How to give material look to the Search view widget

I am using Search view in the app and it was working fine. And I have implemented all of its method That I needed to implement in the App and it is working great and fine as expected. What I was doing: I was adding that in the action bar and in…
2
votes
2 answers

Implementing Search Functionality on Text Change in Android

I am trying to Implement the Search Functionality in my Android Application using the link http://developer.android.com/guide/topics/search/search-dialog.html. It can only search the text entered when pressed on the search button. But it cannot…
Shripal Gandhi
  • 126
  • 2
  • 9
2
votes
1 answer

Custom search in Android?

I have been working on Implementing Custom search in Android App-bar. So, I have added following code in menu_main.xml
Amit Pal
  • 10,604
  • 26
  • 80
  • 160
2
votes
2 answers

What is the best way to implement search in Android?

Scenario I needed to introduce a search or filter in my android application on the basis of some Tags. I have a Json response coming from some Retrofit calls in a Staggered Grid view. Questions What would be good approach to do it? Instant Search?…
Amit Pal
  • 10,604
  • 26
  • 80
  • 160
2
votes
3 answers

Content provider query() not being called (Android TV)

I'm trying to include my app into the Android TV global search, according to the documentation I have to create the following: ContentProvider Searchable.xml And of course include them into the manifest. So that's what I did, my contentprovider is…
Marc
  • 1,094
  • 3
  • 17
  • 38
2
votes
1 answer

setSearchableInfo(searchManager.getSearchableInfo) null pointer exception

I have checked and double checked my manifest according to the docs and other questions. I cannot understand why setSearchableInfo returns NullPointerException MainActivity.java @Override public boolean onCreateOptionsMenu(Menu menu) { //…
cfrz
  • 325
  • 1
  • 3
  • 12
2
votes
1 answer

How to set or remove android SearchView top and bottom padding?

I develop an android apps. I use SearchView in my application. I want to customise it.But I don't remove it's top and bottom padding.When SearchView's height decrements,textbox drowned.Flowing output view- I want to- XML Layout code:
Samsul Hoq
  • 55
  • 6
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