Closed arberg closed 2 years ago
Sounds like a bug. A sample project reproducing it would really help here.
Yeah I know it can be tough without a reproducing sample. I'll see if I can squeeze it in some time to build it
I'll close the issue, because i've noticed it seems to work now on my Android 11, API 30. I have remove items from my ObservableList while the view is removed from viewHierachy, it gets updated as it should when view is shown again. So my guess is that it was an android bug that has now been fixed. I'll close the issue.
Issue: First I create and attached a screen with a ListView in the hierarchy bound by
ItemBinding
andObservableList
, and I populate the list. Then I detach the screen from the view-parent, update the viewModel (due to receieved asyncronous signals), and finally I attach the screen again.In use-case scenario: show a list, open an item on the list in another view, delete the item thus deleting it from underlying storage with listener firing back to list-view-model, and navigate user back to list.
To be honest, I'm not sure if this is not issue in this adapter, the underlying databindings or just not a feature of databindings. Though other all other databindings i've used do update if view is detached.
I'm using binding-collection-adapter 4.0.0 (android 29, and up2date on androidx libraries)