Questions tagged [android-filterable]

132 questions
347
votes
12 answers

How to filter a RecyclerView with a SearchView

I am trying to implement the SearchView from the support library. I want the user to be to use the SearchView to filter a List of movies in a RecyclerView. I have followed a few tutorials so far and I have added the SearchView to the ActionBar, but…
12
votes
2 answers

How to dynamically add suggestions to autocompletetextview with preserving character status

Problem Description: I am facing some problem with AutoCompleteTextView where I have to show suggestions after each keypress. Thing is that, list of suggestion is dynamic like google's suggestion feature. It means the new suggestions should be added…
9
votes
2 answers

RecyclerView behavior - Goes empty when keyboard is opened/closed

I have implemented a RecyclerView with SearchView and Filterable; all classes from v7. Now there is this behavior that is annoying. Whenever the keyboard is brought up or closed the contents of the RecyclerView goes blank. The count is still correct…
priyank
  • 2,553
  • 4
  • 21
  • 33
8
votes
4 answers

Search filter on listview returns wrong results on item click

I have done my fair share of research and found three cases related to my problem. Solution 1 Solution 2 Solution 3 I am not saying that my case is unique or anything,it is jus that i cannot make their answers work for me with my cord. PROBLEM: I…
Steve Kamau
  • 2,516
  • 10
  • 35
  • 66
7
votes
3 answers

Android Recycler view adapter filter with animation

I am trying to optimize the filter method for RecyclerView Adapter in Android. The list is used as an ArrayList. I have seen this post but they are filtering from the original list every time. Example: if there are 10 results for String 'a' then…
Harish Gyanani
  • 1,322
  • 1
  • 19
  • 42
7
votes
2 answers

how to implement filterable in RealmRecyclerViewAdapter

I'm using well RealmRecyclerViewAdapter. My problem is to implement a Filterable that not works. This is the code: private class AirportAdapter extends RealmRecyclerViewAdapter implements Filterable { Context…
ste9206
  • 1,587
  • 3
  • 25
  • 41
5
votes
3 answers

Bypassing the bug in filtering that does not update ListView Android

Here is the code, I used a custom adapter, and applied the Filter method, now the ListView does not update when the backspace key is entered, on when one switches back from an item activity. I read it is a bug in filter, but how do I bypass it, I…
4
votes
3 answers

java.lang.NoClassDefFoundError on Android devices with KitKat

I am developing a app and at the moment the app crashes if I use Android KitKat but with Lollipop devices the app runs without crash. The error from LogCat: java.lang.NoClassDefFoundError: mypackage.utils.PlacesAutoCompleteAdapter$1 at…
3
votes
1 answer

Android - Filter list with Groupie Library

I previously had a custom recycler adapter class that implemented Filterable to enable me to filter an item list by the user entered text string. I have recently migrated to using the Groupie library for my lists for ease of use. How can I implement…
NicCoe
  • 279
  • 2
  • 15
3
votes
2 answers

How to compare originalList to filterList in recyclerview using Filter?

In this code I have search multiple text ex. I have search sachin. sachin is show the list but click to back sachin to sac not display to sa list on adapter. How to solve it without any library? when I press back space and remove a char this time…
Joy
  • 269
  • 1
  • 15
3
votes
0 answers

Update MultiAutoCompleteTextView dropdown android

I want to implement a user tagging feature in my android application. I want the same functionality that Facebook has with user tags in comments. For that I implemented a Custom MultiAutoCompleteTextView in my app, and I also wanted to display both…
3
votes
2 answers

Android: AutoCompleteTextView and Filter - Typing Delay - Why?

Alright guys, this is driving me crazy and I cannot find a solution on the internet! I did a new Eclipse project and pasted this code inside: https://developers.google.com/places/training/autocomplete-android It works, but if I enter or delete (a)…
2
votes
3 answers

null cannot be cast to non-null type kotlin.collections.List - kotlin

I'm trying to add search Filterable in RecyclerView. but the app is getting crashed with following error: kotlin.TypeCastException: null cannot be cast to non-null type kotlin.collections.List at…
GK007
  • 97
  • 2
  • 11
2
votes
0 answers

Diff Util causing non responsiveness Android

I have created my own custom filter view, much like the autocomplete text view. So to explain, I pass in the full list to the adapter, after the user enters 3 or more characters I then filter the list and display using diff util. This is all done…
2
votes
1 answer

How to filter a list on the spinner on the adapter on the click of a button in the activity class

I am trying to filter a list on the spinner. The spinner is situated on the adapter. I have a button on my activity class, and on the click of that button, whatever item on the spinner the user has selected, the corresponding list should be…
1
2 3
8 9