xamarin/Xamarin.Forms

[iOS] Dynamic cell content changes scroll position in CollectionView

Open

#7,195 opened on Aug 17, 2019

 (1 comment) (0 reactions) (0 assignees)C# (1,926 forks)batch import
a/collectionviewhelp wantedp/iOS 🍎partner/cat 😻s/unverifiedt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Description

Current implementation of cell resizing does not work properly. No idea if this is in any way related to #7128 or #7152.

We should probably create an automated test for this since we're now able to listen to scroll position changes through the Scrolled event.

Please also test this on Android in case the issue exists there as well.

Steps to Reproduce

  1. Run the Gallery app on a physical device (tested on XS)
  2. Go to CollectionView Gallery (enable CollectionView)
  3. Go to Item Size Galleries -> Expanding Text (Vertical List)
  4. Tap "More Text" on any item (ignore the first 3 items)
  5. Observe that as the cell height changes, scroll position changes as well
  6. Compare this functionality to Instagram (As you hit "more", scroll position never changes)
  7. If unable to reproduce, keep hitting "More Text" on other items until you see the issue.

Expected Behavior

Dynamic cell height should not move the cell up or down.

Actual Behavior

We lose current scroll position as cell height changes upon user action.

Contributor guide