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
votes
2 answers

How to fix The following classes could not be instantiated in android

I am creating an application consists of search widget on action bar which was downloaded from here and i had placed in a my layout.xml but it was showing error on the xml called The following classes could not be instantiated:The following…
BujjiDeepu
  • 111
  • 1
  • 14
-1
votes
2 answers

How can i place the search bar at the bottom of layout in android?

I need to place search bar at the bottom of activity. How to implement it in android ?
quest
  • 447
  • 2
  • 7
  • 20
-1
votes
2 answers

Move on position in GridView

I am developing an Android App in which i have 60 Items which i have bind with GridViewAdapter which is display 9 Items Per Page and working properly. BUT I want to make search from that 60 Items using Name of Items and want to focus on EditText. I…
Pratik Butani
  • 60,504
  • 58
  • 273
  • 437
-2
votes
1 answer

How to Search Inserted Data with Edit Text

RecordListActivity.Java // query String select = "Select name, phone from RECORD Where(name like " + "'%name%'" + ")"; Cursor cursor2 = mSQLiteHelper.searchData(select); if (cursor2.getCount() > 0…
Ibnul Imtiaz
  • 33
  • 1
  • 11
-2
votes
2 answers

How to make Search Activity to hit API every character input - AndroidX

I want to make similiar like this Activity that can hit API everytime I type a character SearchActivity.java public class SearchActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { …
-2
votes
1 answer

How use Search View

I'm building an app where the user writes his location and the map zoom on it. For the map i'm ok but my problem is take informations from the Search View. SO, my scope is: the user writes his location, presses on search button on keyboard and the…
Storm
  • 73
  • 1
  • 1
  • 12
-2
votes
4 answers

Hide custom search bar if all items in adapter are showing

The problem I have is that listView.getLastVisiblePosition always returns -1 so I can't hide the searchView. I check this right after setting the adapter and anywhere I have tried to put this it still returns -1. I didn't see in the Docs why this…
codeMagic
  • 44,549
  • 13
  • 77
  • 93
-4
votes
2 answers

How to Show long search bar in android

I want to create a search bar in toolbar like this.Search icon show with EditText box
Anand Jain
  • 2,365
  • 7
  • 40
  • 66
1 2 3
27
28