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
1
vote
2 answers

Search Filter in the ListView Not Working as Expected

We have a list view fragment that contains a listview, edit text(for search) and check box(Select All). As mentioned we are using Edit Text for searching the values from the list view. Problem: We have list view displaying 10 items( list view…
1
vote
1 answer

Android Searchview with database not searching

I am trying to implement search functionality in my android app using SearchView. The problem is that once I type the search text on the keyboard nothing happens. The searchable intent is never called. I must be missing something that is causing…
AND4011002849
  • 1,971
  • 8
  • 38
  • 81
1
vote
1 answer

Android: Recent Suggestion listener to open custom activity

I have a searchView with RecentSuggestions and I want when someone press on one of the suggestions to open a different activity from the default that I state on AndroidManifest. I can't find anything to implement this. I tried to override the…
billiout
  • 695
  • 1
  • 8
  • 22
1
vote
0 answers

Listview, List...Searching the List Through action bar search

i am new to android developing and in some trouble and really need help.. Please read before posting suggested links.. i am developing a demo app which shows the installed application including system apps. Although i have done most of the work but…
1
vote
0 answers

How can I get my application to show up in the global-search?

I've been trying to write a simple app that allows me to search from the global-search but no matter what I do, I can't seem get my application to show up in the global-search? package com.mridang.messearch; import java.util.ArrayList; import…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
1
vote
0 answers

Sectioned listview with Search option

I want to create a custom Sectioned ListView in which the Search option can be used. I have searched for various codes, But couldn't find anything appropriate and correct for my case. Any suggestions on how to go about this issue. Thanks in Advance.
Saraschandraa
  • 478
  • 1
  • 10
  • 28
1
vote
1 answer

Search Bar outside ActIonBar in Android

I want to add a search bar in my application, similar to what Zomato does. I have searched a lot and I have learnt search interface is the way to go, but everywhere I have seen it has been added in the action bar whereas I want it in some…
1
vote
2 answers

Android: Add both search recent suggests and custom suggests

I want to add some suggestions for a search widget and I don't know how to show both recent and custom suggestions. The snippet below gives me an CursorIndexOutOfBoundsException: Requested column: 4, # of columns: 4 Any ideas? My code for the…
user3907002
  • 375
  • 1
  • 4
  • 17
1
vote
1 answer

How to hide search view when list view is scrolling

I want to implement an activity which have search functionality that searches contents of a list view.The search bar should be on top of list view and it should hide from user when he scroll down the list view. And when he is searching for something…
Foad Saeidi Nik
  • 260
  • 1
  • 5
  • 20
1
vote
2 answers

Text not showing in searchview widget android

Ive setup a searchview widget in my actionbar to simply filter out the entries in my listview which uses a customadapter. For some reason however, no text shows up in the search widget when I start typing. Also when I collapse the search widget, the…
ze_artista
  • 11
  • 4
1
vote
2 answers

app crashing after creating search interface

I am new to android and i am following this tutorial for creating a search interface. my Searchable Configuration xml file :
1
vote
1 answer

Button collapses even though there is space in Action bar

I wanted to implement a SearchView or a searchDialog in my project, So i edited my main_menu.xml file to look like this
Jamsheed Kamarudeen
  • 718
  • 2
  • 7
  • 14
1
vote
0 answers

How to expand SearchView attached to a view?

I want the default view of searchview in expanded form, placed inside layout file. my code... layout file:
Madhav Bhattarai
  • 847
  • 2
  • 10
  • 29
1
vote
1 answer

Android how to implement expandable listview filter search?

I am trying to develop an android application with expandable list view able to search group items from filter search. I have found many tutorials that do just that where a search-bar is placed at the top and if you type in the box the results get…
1
vote
1 answer

ProgressBar in a SearchView

I want to ask if is there some way, how to accomplish to put ProgressBar in a SearchView widget, like on picture below?