xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

Forms ListView row animations do not occur #5839

Open Adam-Langley opened 5 years ago

Adam-Langley commented 5 years ago

Description

A simple ListView data-bound to an ObservableCollection should animate with add/remove/move animations on iOS. None of these animations occur however.

Steps to Reproduce

  1. Create a simple project with a ListView bound to an ObservableCollection
  2. Bind a button to an add/remove or move action, where you fire the appropriate INotifyPropertyChanged event
  3. Click the button, watch for the list to repaint

Expected Behavior

ListView should animate similar to how UITableView does

Actual Behavior

No animation whatsoever occurs.

Basic Information

samhouts commented 5 years ago

@Adam-Langley Would you mind attaching your sample project? Thanks!

Adam-Langley commented 5 years ago

Hi @samhouts - indeed, let me just clean it up and I'll make it available. Thanks.

Adam-Langley commented 5 years ago

Hi again @samhouts - here's a simple case that I'm working on. The product lazy loads list items from an EF Core database context using skip/take pagination to support infinite scrolling. That aside - click the red button to delete the zero-th element, noting that no animation occurs.

XamForms-AnimatedList.zip

samhouts commented 5 years ago

@Adam-Langley The EF Core DB is making this difficult to run the sample. I'll have to set up the DB on my side to get in running. That said, the animations shoul dbe running, but perhaps there's some snafu with the new platform specific added in https://github.com/xamarin/Xamarin.Forms/pull/4709. I'll check again next week, but if you have the chance, could you confirm that the animation also do not occur in 3.5.0? Thanks!

Adam-Langley commented 5 years ago

Hi @samhouts, Apologies - I hadn't applied the initialisation code required to create the DB. Please use the new ZIP. I have also tried this code against Xamarin.Forms 3.5.0.274416 and it produces the exact same result.

XamForms-AnimatedList.zip

adrianknight89 commented 5 years ago

I have also tried this code against Xamarin.Forms 3.5.0.274416 and it produces the exact same result.

so no platform specific snafu, then?

Adam-Langley commented 5 years ago

I should clarify - "produces the exact same result", meaning, also does not animate correctly.

Adam-Langley commented 5 years ago

Hi @samhouts - is this still being triaged? Thanks