realm-android-adapters icon indicating copy to clipboard operation
realm-android-adapters copied to clipboard

Advanced RecyclerView sample

Open cmelchior opened this issue 8 years ago • 5 comments

The current RecyclerView sample is just a glorified ListView. We should create a more advanced one with the potentially following things:

  • Swipe-to-delete
  • Animations (require https://github.com/realm/realm-java/issues/989)

cmelchior avatar May 13 '16 11:05 cmelchior

It could be useful to put an example of a filter for recyclerview imho. I'm having problem using realm conditions foto dynamically filter a list. For example, I have a realm recyclerview and an edittext, how can I filter the list according to the edittext? At the moment I need to change swap adapter or avoid using realm filter and remove/add element as I've ever done with common recyclerview. Is there a better way?

coletz avatar Aug 26 '16 07:08 coletz

I am facing the same problem as @Coletz is facing. I also want example with filter, currently it is very hard or impossible to do.

Shajeel-Afzal avatar Sep 02 '16 21:09 Shajeel-Afzal

After some problem I've found out how to filter in a "proper" way (at least it's reliable and pretty fast): when you need to update the filter (eg edittext change or on click) you simply use recyclerView.updateData(realm.where(MyClass.class).equalTo("myField", editText.getText().toString())) I can write on the edittext and after each character the text is updated realtime

Dunno if that's the "official" way, but it's working

coletz avatar Sep 05 '16 09:09 coletz

I would love a good animations and swipe-to-delete example.

romeroz avatar Oct 20 '16 16:10 romeroz

👍

sismotur avatar Mar 07 '17 22:03 sismotur