thefex / Xamarin.Bindings.AdvancedRecyclerView

Xamarin Android binding library for: https://github.com/h6ah4i/android-advancedrecyclerview
Apache License 2.0
0 stars 0 forks source link

Add Move and Replace event support in MvxRecyclerViewItemsSourceBridge #9

Closed JensSchadron closed 5 years ago

JensSchadron commented 5 years ago

The Move and Replace events from NotifyCollectionChangedAction aren't impemented in MvxRecyclerViewItemsSourceBridge so it's impossible to directly update an item at the time of writing.

In my case, it's necessary as sometimes the entire item as passed through into a valueconverter because of the amount of properties are needed to decide onto the correct output value. However I need to trigger the Reset event in my case in order to update a header in the MvxAdvancedExpandableRecyclerView.

thefex commented 5 years ago

I planned to that but I would need about ~10-20 work hours to implement that properly (first implementation try failed - it is rather difficult to do that GOOD)

Nevertheless, I usually pass whole object as "Key" which has INotifyPropertyChanged so I can update header dynamically without resetting state. Besides, it seems that move/replace animation works even without supporting those events - please check updated samples with DynamicData.

JensSchadron commented 5 years ago

I tried your advice (back when you posted your answer here) and it works pretty well. Forgot to close the issue though, so I'll do that now.