manas-chaudhari / android-mvvm

MVVM on Android using RxJava and Data Binding
Apache License 2.0
502 stars 81 forks source link

Exception raised when View is recycled in a RecyclerView #63

Open sander48k opened 5 years ago

sander48k commented 5 years ago

It seems that when a View is recycled in a RecyclerView, the view model of that view is set to null (in onViewRecycled of RecyclerViewAdapter.java). Subsequently the pending bindings are executed resulting in a crash.

manas-chaudhari commented 5 years ago

Can you share an example of Binding that crashes? BindingAdapters are expected to be able to handle null values.