409 questions
0
votes
1
answer
51
views
Android: Display concrete part of text in TextView
I'm creating search in app and highlighting part of text in TextView (with spannable). But text fields has fixed width/height and search match could be behind TextView border (not displayed to user).
...
1
vote
1
answer
87
views
Search menu not showing in Android Studio toolbar
I've made a custom toolbar with a title and functioning popup menu, but I can't seem to get a search menu to show up in the toolbar. The search menu icon doesn't even show in the toolbar for this ...
-2
votes
2
answers
153
views
Menu won't show up in search bar
I'm currently facing a problem with a search bar in my app. The search bar is part of an inflated layout from a menu. Within this menu, there's an icon called 'log_out_button' that should appear in ...
-1
votes
1
answer
605
views
How to implement the Search View Docked mode
Currently, I am using the Material 3 library to code my application's design.
In the official Material 3 website (m3.material.io), in the Search section, at the bottom there is a picture of a Search ...
0
votes
1
answer
77
views
Why does my Searchview doesn't display the queryHint in android using androidx?
I have a searchView in the Toolbar which also has Gridview elements. Everything works fine except the queryHint doesn't get displayed in the searchView. I have tried setting android:iconifiedByDefault=...
3
votes
1
answer
2k
views
How to add two trailing icons on Material3 Search Bar on Android?
I want to add two trailing icons (one of them being the 3 dots menu icon) on my Material 3 Search Bar.
Examples:
Source: GitHub
and this:
Source: Material 3
But I can't find any way to do this nor ...
1
vote
0
answers
163
views
Tell me how to save the search history?
I'm trying to save and display the search history. To do this, I use the latest version of the library, the search history is displayed until I exit the application.'com.github.mancj:MaterialSearchBar:...
0
votes
1
answer
92
views
Android searchview layout not set in correct position
I'm working on my android app to build a custom searchview. I'm having a problem with the layout because I can't be able to get the back button to go on the left, the search edit text to go on the ...
0
votes
1
answer
56
views
How can i show my filtered data on another screen in android?
I am working on an app where at my home fragment I have a searchview under that there is a recyclerview where I am showing the whole data but when user uses searchview and search for any data now I ...
2
votes
0
answers
674
views
Android searchview filter in recyclerview pagingDataAdapter with Paging3 is not updating the data
I am trying to search a value from database with the search filter. but not updating the searched values in adapter.
Note: loading the data using Paging3 library.
private val mDiffer: ...
-1
votes
1
answer
1k
views
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 ...
0
votes
1
answer
151
views
How to open search interface over BottomNavigationView's fragment?
I want to implement an interface having BottomNavigationView where clicking on the top search bar opens the next interface shown in figure 2. I have implemented BottomNavigationView. But unable to do ...
0
votes
0
answers
391
views
Why my app crashes when search not found any match after implementing ConcatAdapter in Android Kotlin?
I just implemented my first ever concatAdapter. Since then when I enter some text in the search field, the app crashes when there's no item that matches the search key, if it matches then it returns ...
1
vote
0
answers
366
views
Search doesn't work as expected after selecting an item from the BottomSheetDialogFragment and then select the bottomNavigation menu
I have an awkward situation for which I have been trying to find the reason and fix it for two days and I failed.
Let me explain it first.
On launching the app recyclerView in the 'HomeFragment' is ...
-2
votes
1
answer
315
views
How to Search Inserted Data with Edit Text
RecordListActivity.Java
// query
String select = "Select name, phone from RECORD Where(name like " + "'%name%'" +
")";
Cursor cursor2 ...
0
votes
1
answer
44
views
Pip is closing after submitting a searchable query
I have an edge case when pip is enabled and the user wants to search something, the pip will get dismissed(when the user submit a query which has more than one item).
The search component is based on &...
0
votes
0
answers
599
views
RecyclerView list didn't refresh after delete an element
I am using MVVM Architecture with LiveData and my problem is with refreshing RecyclerView list after delete an element. When I use SearchView and then delete some item, it is still on List visible to ...
0
votes
1
answer
986
views
How to make a Search Bar in android?
Can i use editText as Search bar in android? I am not trying to make a search bar inside a toolbar so i am thinking that editText would be fine but i am not sure and that is why i am asking. I have ...
3
votes
0
answers
452
views
Understanding android.permission.GLOBAL_SEARCH uses
I am trying to figure out the use of android.permission.GLOBAL_SEARCH documentation does not provide any useful information.
What I am trying to achieve and where I am confused?
IMO this permission ...
2
votes
1
answer
2k
views
How to implement a search function in my Android pdf reader app?
I am willing to add search functionality to my pdf reader.I dont know how do i achieve this functionality.Any help would be appreciated.
Note:I am using third party library to read the pdf file.
Here ...
-1
votes
2
answers
707
views
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 ...
1
vote
1
answer
242
views
Android SearchView only briefly displays cursor when I click on search input field, and no keyboard displays. Can't input text
I'm trying to implement a SearchView inside of a layout, not in a menu layout, but when I click on the search input box, the cursor just briefly shows, then disappears, and the keyboard never displays....
2
votes
1
answer
237
views
Recyclerview + Search filter: Can not delete items from recyclerview and wrong behavior in adapter
I have a program that I am writing to be able to view the files on the device in the app folder via a recyclerview, and delete them.
The mainactivity handles the file deleting and removal, and the ...
1
vote
1
answer
1k
views
How to search a diffutil filter out results from existing list
I'm using DiffUtil in my RecyclerView to displays a list from a database using the Room component. I would like to add a search function in the Appbar, that will filter out the existing items in the ...
1
vote
1
answer
119
views
Empty dataset indicator for RecyclerView not showing
I'm trying to show a Snackbar with a message whenever the dataset of a filtered RecyclerView contains 0 items but for some reason, the Snackbar doesn't appear at all. Does the relevant code need to go ...
0
votes
1
answer
63
views
Difference between SearchView hint via XML and dynamically
What's the difference between the searchable.xml (required to use SearchView widget) and declaring its hint dynamically? Why is it that declaring the SearchView hint dynamically works but doing the ...
0
votes
1
answer
197
views
Title in CollapsingToolbarLayout truncates on SearchView open
Whenever I open a SearchView within a CollapsingToolbarLayout, the page title gets squashed and truncated to 1 side for some reason rather than being positioned underneath the SearchView widget. Is ...
0
votes
0
answers
72
views
Implement Android Search Interface with Jetpack
i'm currently trying to implement in app search for my application and doing so with android jetpack
however i can't find a single resource on how to do so using the single activity principle.
Every ...
1
vote
1
answer
722
views
How to implement Search Filter with RecyclerView
I followed some youtube tutorial about SQLite and RecyclerView (https://www.youtube.com/watch?v=VQKq9RHMS_0&ab_channel=Stevdza-San) I completed all the things and customize it as I need to my app ...
2
votes
2
answers
246
views
How to get the total query count with a PagedListAdapter in Android Room
This follows a logic from a previous question, quoting the relevant code portion here:
I have the following query implemented and it can return any amount of results between 0 up to the number of ...
0
votes
1
answer
285
views
Show search view suggestions using full height
Look at the search e.g. of the Play Store:
When one types into the search field (left screenshot), all content is hidden / there is a white background for the suggestions (right screenshot).
Nothing ...
4
votes
0
answers
242
views
SearchView suggestions: SearchView.OnQueryTextListener vs custom content provider (android:searchSuggestAuthority)
I am trying to implement my first SearchView with suggestions. As far as I understand, I have two possibilities to provide suggestions:
In the searchable.xml configure a custom content provider using ...
6
votes
0
answers
2k
views
Should one use androidx.appcompat.widget.SearchView or android.widget.SearchView?
I am confused which version of SearchView I should use. The documentation for androidx.appcompat.widget.SearchView clearly states
If you're developing your app for API level 11 and higher only, you
...
1
vote
1
answer
352
views
The Search View is not giving any result in my Fragment containing RecyclerView. After I click on the Search icon the screen is just blank
I have a fragment with RecyclerView and Room Database and I want to add a search view. I have successfully added the search icon and also added the code in the Fragment as well as Adapter. But the ...
0
votes
1
answer
365
views
Searchview in toolbar not filling all available space
I want to make it so that the search view inside my toolbar takes all the available space. As of now, it doesn't, instead, it leaves a slither of unused space right next to the back button. I want it ...
6
votes
2
answers
3k
views
Android Google Search Bar with Drawer
My app is currently implemented with the Single activity approach (Using navigation architecture component with one main activity and several fragments). I am currently using a toolbar with a drawer.
...
1
vote
0
answers
139
views
Search in Fragments that hold Recyclerview
I have 3 Fragments and they all are holding a recyclerView. But I don't know how I should call adapter.getFilter().filter(newText); in onQueryTextChange. Any ideas?
MainActivity:
public class ...
1
vote
0
answers
170
views
RecyclerView getting wrong position using onClick after searching
My RecyclerView is getting a filtered position after the list is filtered using the SearchView. This means that when the list item is clicked the information for the wrong item is displayed. I'm ...
4
votes
1
answer
314
views
Android: Tabs and searchbars
I have two tabs and each tabs has its own searchbar.
I bind the searchbar in onCreateOptionsMenu. However, the searchbars only work if I leave the screen once and return to the screen (meaning it ...
0
votes
2
answers
112
views
Trouble Using Edit Search Function in Recycler View with Cards
I am trying to search through a recycler view with cards by allowing a user to search. When the user searches, the cards should "reorganize" to show according to the characters entered by the user. I ...
1
vote
1
answer
931
views
How to stop Incessant crash on search filter in Android recyclerview
I have been struggling to stop an index out of bounds exception crash every single time I do a search in a searchview. I tried a couple of things listed online :
on search getting array out of index ...
0
votes
2
answers
2k
views
Open new activity for searchview when search is clicked
I want to open a new activity whenever the search icon is clicked on the mainactivity. This new activity called SearchableActivity will handle all the relevant search results in the listview. I have ...
-2
votes
2
answers
930
views
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(...
1
vote
1
answer
211
views
Search items from listview with custom adapter
Am trying search from listview using custom adapter. i have search widget in toolbar menu and i can display widget. when i click on search icon, it expands, but when i start typing, search does not ...
7
votes
3
answers
4k
views
How I Can make Scrolling toolbar with search box like amazone
Hi I want to make scrollable toolbar with searchbox. on scrolling toolbar should be hide toolbar and show search box. Give me some suggestion that how i can build this kind of UI for my application.
...
3
votes
1
answer
1k
views
How do I allow search in android that works with character accents aswell?
I have implemented a search mechanism in my app, such that when I search for a name or email, it displays the string with the matching character. However, there are some accented strings in my list ...
1
vote
1
answer
969
views
How do I ignore case for characters to be highligted while searching in spannable strings?
I have implemented a search mechanism in my app such that, when you filter through the names in the list, it highlights the names that match, with only issue being it only highlights the lowercase ...
1
vote
1
answer
245
views
SearchView fires only the second time when using a filter in ArrayAdapter
I have added in the Toolbar a SearchView to filter some items.
@Override
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
super.onCreateOptionsMenu(menu, ...
2
votes
1
answer
4k
views
How to maintain same DataSource for List,Filter and Search in Android Paging Library
I am having activity that displays list of items and also having filter and search option. I am displaying the items using android paging library. First time the List of items will be loaded its ...
0
votes
2
answers
250
views
How to change color of searchView's search icon color programatically inside edittext?
I have SearchView in my toolbar
and I am wondering how can I change search icon inside SearchView Edittext drawableleft icon color programatically?
searchView = menu.findItem(R.id.action_search)?....