-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CollectionView - Recycle DataTemplates when using template selector #12011
Commits on Dec 10, 2022
-
[Android] Use different view types per item template
Previously we were returning a single view type id for all 'items' in collectionview, which meant if you were using a template selector, and had a variety of returned different DataTemplates, each would share the same recycled item. When a recycled item is reused for a different template, it causes the view for that template to be recreated to be correct for the template selected. This change returns a unique item id per DataTemplate.Type, so that recycled items should always have the correct DataTemplate.Type and not need to be recreated with a different view hierarchy.
Configuration menu - View commit details
-
Copy full SHA for 22443a6 - Browse repository at this point
Copy the full SHA 22443a6View commit details -
[iOS] Distinct Cell reuse id's for different DataTemplates
Like on Android, we were using a single cell reuse identifier for iOS "items" regardless of if they had different DataTemplates. If you were using a data template selector, and returned different data templates, whenever a recycled cell's data template didn't match the data template it needed to display for the new/recycled context, the whole view tree of that template would be recreated. This change ensures we have a unique cell reuse id for every different DataTemplate.Type that might be returned by the template selector so that when a cell is recycled it should always be reused for the same Data Template it was created for, and so the view hierarchy won't be recreated. This does require the DetermineCellReuseId to know the indexpath we're getting it for, so a new method was introduced, internal for NET7, protected for NET8+, and in NET8+ the old method is obsoleted.
Configuration menu - View commit details
-
Copy full SHA for 2e0bfba - Browse repository at this point
Copy the full SHA 2e0bfbaView commit details
Commits on Jan 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4c411fe - Browse repository at this point
Copy the full SHA 4c411feView commit details -
Configuration menu - View commit details
-
Copy full SHA for 21ec9a8 - Browse repository at this point
Copy the full SHA 21ec9a8View commit details
Commits on Jan 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 3401e73 - Browse repository at this point
Copy the full SHA 3401e73View commit details -
Configuration menu - View commit details
-
Copy full SHA for c3b3643 - Browse repository at this point
Copy the full SHA c3b3643View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44a9196 - Browse repository at this point
Copy the full SHA 44a9196View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5874aa0 - Browse repository at this point
Copy the full SHA 5874aa0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 846db59 - Browse repository at this point
Copy the full SHA 846db59View commit details
Commits on Feb 10, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cfe3cc1 - Browse repository at this point
Copy the full SHA cfe3cc1View commit details
Commits on Feb 14, 2023
-
Update src/Controls/src/Core/Handlers/Items/Android/Adapters/ItemsVie…
…wAdapter.cs Co-authored-by: E.Z. Hart <hartez@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for d518d52 - Browse repository at this point
Copy the full SHA d518d52View commit details -
Update src/Controls/src/Core/Handlers/Items/Android/Adapters/ItemsVie…
…wAdapter.cs Co-authored-by: Rui Marinho <me@ruimarinho.net>
Configuration menu - View commit details
-
Copy full SHA for 6b7efed - Browse repository at this point
Copy the full SHA 6b7efedView commit details -
Update src/Controls/src/Core/Handlers/Items/Android/Adapters/ItemsVie…
…wAdapter.cs Co-authored-by: Rui Marinho <me@ruimarinho.net>
Configuration menu - View commit details
-
Copy full SHA for 354f909 - Browse repository at this point
Copy the full SHA 354f909View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7447e65 - Browse repository at this point
Copy the full SHA 7447e65View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e24c68 - Browse repository at this point
Copy the full SHA 2e24c68View commit details
Commits on Feb 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 81f9e10 - Browse repository at this point
Copy the full SHA 81f9e10View commit details
Commits on Feb 16, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 847ae79 - Browse repository at this point
Copy the full SHA 847ae79View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42b34e6 - Browse repository at this point
Copy the full SHA 42b34e6View commit details
Commits on Feb 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f3e27f7 - Browse repository at this point
Copy the full SHA f3e27f7View commit details
Commits on Mar 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9448f74 - Browse repository at this point
Copy the full SHA 9448f74View commit details
Commits on Mar 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9038032 - Browse repository at this point
Copy the full SHA 9038032View commit details
Commits on May 10, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 63cdae2 - Browse repository at this point
Copy the full SHA 63cdae2View commit details
Commits on May 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 8fc33f7 - Browse repository at this point
Copy the full SHA 8fc33f7View commit details
Commits on May 15, 2023
-
Calculate correct position for carousel adapter
The `CarouselViewAdapter` loops by basically returning a very large value for item count of its adapter/source which means the recyclerview is going to ask for view types with a position value that does not actually exist. Previously this was ok because we returned only a single item view type ever, however now that we want to return a different type for template selector scenarios where there are potentially multiple template types, we need to override also the `GetItemViewType` and pass in the calculated position in the list properly (as we do in `OnBindViewHolder` here already) since the base `ItemsViewAdapter` class now calls `ItemsSource.GetItem(position)` in its `GetItemViewType()` call.
Configuration menu - View commit details
-
Copy full SHA for c67d36f - Browse repository at this point
Copy the full SHA c67d36fView commit details