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

Android realtime sql database search functionality

I am developing an android appstore (appmarket) application. Files information is in sql database. I use Json for retrieving the information of the files from web sql database. How can I add realtime search functionality for my appsore? I mean…
Namikaze Minato
  • 1,332
  • 4
  • 23
  • 41
0
votes
2 answers

How to load a layout and add it to another layout in Android?

I want to load a layout XML file and ad the layout to the current content view. So, if I get this layout over here: and if I hit the hardware search button, then I want to display a search bar at the top of the screen, like this: Based on this…
MC Emperor
  • 22,334
  • 15
  • 80
  • 130
-1
votes
1 answer

How to fix/implement Search Filter with RecyclerView

I followed the same youtube tutorial (https://www.youtube.com/watch?v=VQKq9RHMS_0&ab_channel=Stevdza-San) and read the answer/feedback from this user's question (How to implement Search Filter with RecyclerView). I want to add the Search Bar and…
-1
votes
2 answers

RecyclerView not updating dynamically on search

I have a recycler view with flight information, and I am searching using the flight number on the search bar. When I search, the recyclerview is updated dynamically for which the logic is there in my filter function, however when I clear the search,…
Ian Bell
  • 533
  • 5
  • 18
-1
votes
1 answer

SearchView's onClose listener never runs

Got a SearchView (androidx, not support lib) I have added its proper listeners like: @Override public boolean onQueryTextSubmit(String query) { Toaster.show(this, "onQueryTextSubmit!"); return true; } @Override public…
Adam Varhegyi
  • 11,307
  • 33
  • 124
  • 222
-1
votes
1 answer

Search View On Sqlite Database Not Working

I am working on application, that exists Sqlite Database. What I have done to implement the search on sqlite database using list, I have implemented the like query and I came to know; The searchview is not searching data from sqlite... Here is my…
user11507886
-1
votes
2 answers

I'm trying to create this Search bar on Android

I'm trying to create this search bar on Android, where the magnifying glass on the left is fixed, the background in the search box is white with round corners, the spaces between left side, back button, right side, search box, right side are 16dp.…
devB78
  • 11,894
  • 3
  • 14
  • 14
-1
votes
1 answer

Put Search View Widget to the Right corner in Toolbar

I want to put the search widget to right corner of the toolbar and when press it to open all the way to the left. But in case the search view goes out of the screen. Any ideas?
Nick
  • 2,818
  • 5
  • 42
  • 60
-1
votes
1 answer

listview Search: Attempt to invoke virtual method 'void android.widget.Filter.filter(java.lang.CharSequence)'

I already read all the questions that has a same error like in my code, I don't know whats wrong, Please help me FragmentSearch.java adapter = new FunDapter<>(SearchFragment.this.getActivity(), itemList, R.layout.search_row, dic); lv =…
Kny
  • 95
  • 8
-1
votes
1 answer

Getting Run time error while setting up search interface for my app

I am designing a search feature for one of my screens in my app. I followed exactly according to android official documentation for setting up search interface When I run my app I always get runtime error stating that: `AndroidRuntime: FATAL…
black sheep 369
  • 564
  • 8
  • 19
-1
votes
3 answers

Android Tabbed Activity Searchview not opening in Toolbar

the problem I've used the Setting Up The Search interface doc from the official Android documentation but I'm not getting far for some strange reason as the SearchView refuses to open in the Toolbar cfr. Android docs the code I've added the menu…
Liam Martens
  • 731
  • 7
  • 22
-1
votes
1 answer

How do I add a searchbar on an ImageButton, which when clicked expands horizontally to show the textbox?

UI The top where it says Artists, Songs is a PagerTitleStrip. And next to it is an ImageButton with a search icon. Artists, Songs are implemented using fragments. What I want to achieve is that when I click the search icon, the search icon should…
-1
votes
1 answer

How to create search on multi choice ListView?

I have created search on listview,but row selection get effected while search,I assume selection is maintained based on index.Can any one explain best way to solve this problem.
BiswajitP
  • 233
  • 4
  • 15
-1
votes
1 answer

Search in Android depends on value of spinner

I created an app that shows a list of places and i created a search dialog wherein the user will type in edittext so he/she will find the desired place. First, search is working when its only place and I try to add spinner with values which are the…
APCM
  • 1,704
  • 1
  • 11
  • 24
-1
votes
1 answer

Android Search Interface and Material Design

Is the Android Search Interface as it is implemented in the Documentation still up-to-date for the new Toolbar which was Introduced in Android 5 with AppCompatActivity and Material Design? Or is this still a solution for the old ActionBar(e.g. from…
unlimited101
  • 3,653
  • 4
  • 22
  • 41
1 2 3
27
28