realm / realm-android-adapters

Adapters for combining Realm Java with Android UI components and framework classes
realm.io
Apache License 2.0
414 stars 134 forks source link

Advanced RecyclerView sample #27

Open cmelchior opened 8 years ago

cmelchior commented 8 years ago

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

coletz commented 8 years ago

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?

Shajeel-Afzal commented 8 years ago

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.

coletz commented 8 years ago

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

romeroz commented 8 years ago

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

sismotur commented 7 years ago

👍