23314

Duplicated Cell Animation During Batch Update

Question:

I have set up a collectionView to have custom reordering behavior <a href="https://stackoverflow.com/questions/39172207/custom-cell-reorder-behavior-in-collectionview" rel="nofollow">via the solution here</a>

However, when a cell is quickly dragged to a new row, the animation shows the dragged cell animate from its original position again (see below):

<a href="https://i.stack.imgur.com/fcdCl.gif" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/fcdCl.gif" data-original="https://i.stack.imgur.com/fcdCl.gif" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

<a href="https://i.stack.imgur.com/invwZ.gif" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/invwZ.gif" data-original="https://i.stack.imgur.com/invwZ.gif" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

I am wondering how I could have it just drop the dragged cell at the row it's been dragged to, rather than showing it animate from its original cell again.

Answer1:

I have solved this well by increasing the setting the dragged cell's layer.speed property when the interactive movement begins, and then setting it back to 1 when the batchUpdates are completed.

Recommend

  • Messing UIButton in each UICollectionViewCell in Scrolling Filmstrip
  • How to select CollectionView cell in RxSwift
  • UIRefreshControl with low height UICollectionView
  • AJAX Chat Box Scrolling Up Issue
  • jQuery, Calling multiple animations in a row on click
  • Reinitialise existing jQuery flexslider with new options
  • I have a modal that opens a second modal and cannot close the first modal if open then close the sec
  • Where to put clearQueue in jQuery code
  • Change the width of the JQM panels
  • Variant from android-autofittextview library : scaling makes strange behaviour
  • Shadows for Instantiated Game Object bug?
  • How to control Trigger state (Pause, Play) using code (not just buttons)
  • Jquery UI Sortable, move item automatically
  • div fade-in when window is scrolled a certain distance from the top
  • Unable to play media with vlc ocx
  • Avoid registering duplicate broadcast receivers in Android
  • Adding a model to a Marionette CollectionView's collection doesn't trigger onItemAdd callb
  • How to handle elastic beanstalk deployment so it uploads only changed files
  • Check all values in string[] for length?
  • Who propagate bugfixes across branches (corporate development)?
  • Center align outputs in ipython notebook
  • xcode don't localize specific strings
  • custom UITableViewCell with image for highlighting
  • NHibernate Validation Localization with S#arp Architecture
  • If I include Java 8 in my Android app does that affect which devices it will work on?
  • ilmerge with a PFX file
  • Bug in WPF DataGrid
  • Controls, properties, events and timers running in design time
  • Sending data from AppleScript to FileMaker records
  • vba code to select only visible cells in specific column except heading
  • Updated Ionic CLI but shows previous version (Windows)
  • Redux, normalised entities and lodash merge
  • Unanticipated behavior
  • using conditional logic : check if record exists; if it does, update it, if not, create it
  • how does django model after text[] in postgresql [duplicate]
  • Setting background image for body element in xhtml (for different monitors and resolutions)
  • Can Visual Studio XAML designer handle font family names with spaces as a resource?
  • Can't mass-assign protected attributes when import data from csv file
  • Running Map reduces the dimensions of the matrices
  • Unable to use reactive element in my shiny app