[Enhancement] Add CollectionView progress behind feature flag (#4265)
authorE.Z. Hart <hartez@users.noreply.github.com>
Tue, 13 Nov 2018 12:49:08 +0000 (05:49 -0700)
committerRui Marinho <me@ruimarinho.net>
Tue, 13 Nov 2018 12:49:08 +0000 (12:49 +0000)
commitaabe44fe7d6425a545721e4a1e6e3bd3abba3b44
treeb92c46dc34630dff561924611e0350662503cc06
parenta7d6d2ce593e7ac1bf305a04bb721b1d9b6f64b3
[Enhancement] Add CollectionView progress behind feature flag (#4265)

* The barest beginnings of starting a spike for LV2

* Very basic RecyclerView

* Very, very basic UICollectionView

* Start setting up galleries

* De-duplicate some gallery code

* Android horizontal layout

* Very basic horizontal/vertical text lists for iOS

* Vertical list views working in iOS, stashing while trying to figure out what the deal is
with horizontal views and frames with heights of 1

* Working on rotation issues in iOS

* Fix name of renderer in UWP; make horizontal scrolling work for horizontal
lists on UWP

* Set up gallery to generate different sizes of lists for testing

* Respond to items source updates on UWP

* Add gallery for GridLayout; Add GridLayout;
begin GridLayout implementation UWP

* Basic UWP gridness

* Add demo page for grid layouts with text;
Handle grid layout spans on UWP; handle grid layout span changes on UWP;

* Implement span updates on Android grid layouts;

* Ironed out most of the iOS text cell layout issues

* iOS vertical/horizontal text lists now working reliably;

* In progress on UWP DataTemplate stuff

* Dumping the data template into the itemsource

* Vertical list basically working with DataTemplate; horizontal list having image size issues

* Clean up names and move classes to their own files

* Adding some notes for FormsContentControl

* Rolling back platform test on UWP

* Fix Tizen build

* Fix typo and roll back old test code

* Remove old testing comments

* Make basic data templates work on Android

* Update measure to work horizontally

* Remove old testing code

* Terser rectangles

* Use nameof()

* Rename FormsContentControl to ItemContentControl

* Use CreateRenderer instead of GetOrCreateRenderer

* Clean up TemplateCodeCollectionViewGallery

* Add grid galleries for templates

* Nicer example templates

* Create gallery to test removing items from collections

* Smooth single item removal on Android

* Smooth item insertion on Android

* Observable collection item adds working on UWP

* UWP Remove

* Split files

* Add gallery for snap points; start implementation of snap points on Android;

* Move snap handling to separate class; implement Start snapping (horizontally)

* Debugging vertical overlap issues on Android

* Temporarily add IsClippedToBounds to generators to force clipping on Android

* Start and End SnapHelpers are working horizontally and vertically

* Consolidate some snap code on Android

* Mandatory Single Snapping working for Center/Start horizontally

* Throwing together scrollto gallery

* Super basic "ScrollTo" implementation for Android, plus test page

* Expand ScrollTo test harness;

* Move ScrollToRequestEventArgs to its own file

* Mostly working Carousel renderer; needs some cleanup and its own gallery pages

* Carousel gallery

* Naming cleanup

* Make parameter name consistent

* Finally some basic data template functionality for lists

* Checkpoint; sort of working

* Working out estimate size hacks

* Working out cell optimizations

* Checkpoint before some serious refactoring

* Collapsing closer to a solution; text lists and grids working;
template lists and grids working; uniform size hint mostly implemented;

* Remove awkward Update method

* No longer hard-coding list item heights estimates

* Consolidate more code

* Get rid of event on ItemsViewLayout

* Remove public NeedsEstimate stuff

* Get rid of IConstrainedCell

* Watch for Span changes on iOS

* Indexed ScrollTo on iOS

* Implement removal/insertion of items on iOS

* Handle Move, Reset, Replace on Android

* Add screens to test ScrollTo Item; implement ScrollTo Item for iOS

* ScrollTo Item working on Android, but only works for MakeVisible

* Implement Android ScrollTo Animated ScrollToPosition

* Ugly but functional non-animated scroll with ScrollToPosition

* Move Scroll logic into helper class for clarity and maintenance

* Fix Start snapping with grids (hard-coded span of 1)

* Fix next/previous row/col snapping bug for EndSnapHelper

* Remove some debug statements

* Clean up example code

* Fix missing delegate setting on CollectionView

* Add filtering example

* Watching the adapter and handling empty view from the renderer

* Add debugging for all the FindViewHolder methods

* Suuuuper basic but functional EmptyView

* Allow EmptyView to be turned on and off

* Building tests for all the EmptyView scenarios

* Set Platform on EmptyView (for now)

* Templated EmptyView on Android

* Clean up merge errors

* Require flag to use CollectionView on Android

* Require flag to use CollectionView on UWP

* Restore Label functionality commented out during testing

* Adding a note for myself

* Add flags for iOS; flags for Android CarouselView;

* Remove Calabash out-commenting

* Undo changes to DotSettings; remove outdated TODOs

* Fix formatting

* Remove debugging code; remove outdated todos; remove unnecessary comments

* Undo randon VS changes

* Include CollectionView in experimental renderer testing

* Use correct property in nameof() call

* Rename ScrollToRequestEventArgs Animate -> IsAnimated

* Rename Constrain -> ConstrainTo for consistency

* Add Core flags feature; add flag verification for CollectionView features

* Make sure no one is subclassing native CollectionView stuff without flag

* Set CollectionView flags for unit tests

* Make flags depend on Application.Current

* Fix iOS 9.3 exception when laying out CollectionView

* Use Device.Flags

* Move CV flag check to CollectionView; use Device.Flags on native platforms;

* Move classes into their own files

* Make CollectionView flag check method non-browseable

* Remove old TODO

* Remove Element.Platform sets

* stubbed toolbox entries and snippets for Carousel and Collection

* updated CV snippet to include layout

* Remove Linq using statement

* Remove unused using statement

* Turn off CollectionView in Control Gallery

* Move PropertyChangedEventArgsExtensions to internal on each platform

* Clean up debugging code

* Fix broken test setup

* Remove ToString overrides

* Fix broken test screen
Fix broken test screen

* Fix rebase errors

* Update submodule

* Fix rebase error
130 files changed:
Stubs/Xamarin.Forms.Platform.cs
Xamarin.Forms.Build
Xamarin.Forms.ControlGallery.Android/FormsAppCompatActivity.cs
Xamarin.Forms.ControlGallery.WindowsUniversal/FlowerBuds.jpg [new file with mode: 0644]
Xamarin.Forms.ControlGallery.WindowsUniversal/Legumes.jpg [new file with mode: 0644]
Xamarin.Forms.ControlGallery.WindowsUniversal/Vegetables.jpg [new file with mode: 0644]
Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj
Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs
Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs
Xamarin.Forms.ControlGallery.iOS/Resources/FlowerBuds.jpg [new file with mode: 0644]
Xamarin.Forms.ControlGallery.iOS/Resources/Fruits.jpg [new file with mode: 0644]
Xamarin.Forms.ControlGallery.iOS/Resources/Legumes.jpg [new file with mode: 0644]
Xamarin.Forms.ControlGallery.iOS/Resources/Vegetables.jpg [new file with mode: 0644]
Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj
Xamarin.Forms.Controls/App.cs
Xamarin.Forms.Controls/CoreGallery.cs
Xamarin.Forms.Controls/CoreGalleryPages/CollectionViewCoreGalleryPage.cs [new file with mode: 0644]
Xamarin.Forms.Controls/CoreGalleryPages/ListViewCoreGalleryPage.cs
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/CarouselCodeGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/CarouselViewGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/CollectionModifier.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/CollectionViewGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/DataTemplateGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/DefaultTextGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/DemoFilteredItemSource.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EmptyViewGalleries/EmptyViewGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EmptyViewGalleries/EmptyViewStringGallery.xaml [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EmptyViewGalleries/EmptyViewStringGallery.xaml.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EmptyViewGalleries/EmptyViewTemplateGallery.xaml [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EmptyViewGalleries/EmptyViewTemplateGallery.xaml.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EmptyViewGalleries/EmptyViewViewGallery.xaml [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EmptyViewGalleries/EmptyViewViewGallery.xaml.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EnumSelector.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ExampleTemplates.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/FilterCollectionView.xaml [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/FilterCollectionView.xaml.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ItemAdder.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ItemRemover.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ItemReplacer.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ItemsSourceGenerator.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ObservableCodeCollectionViewGridGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ObservableCollectionGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ScrollToCodeGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ScrollToGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ScrollToIndexControl.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ScrollToItemControl.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/SnapPointsCodeGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/SnapPointsGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/SpanSetter.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/TemplateCodeCollectionViewGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/TemplateCodeCollectionViewGridGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/TextCodeCollectionViewGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/TextCodeCollectionViewGridGallery.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/GalleryBuilder.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/VisualStateManagerGalleries/DisabledStatesGallery.cs
Xamarin.Forms.Controls/GalleryPages/VisualStateManagerGalleries/VisualStateManagerGallery.cs
Xamarin.Forms.Controls/Xamarin.Forms.Controls.csproj
Xamarin.Forms.Core.Design/toolbox/Xamarin.Forms.toolbox.xml
Xamarin.Forms.Core.UnitTests/ItemsViewTests.cs [new file with mode: 0644]
Xamarin.Forms.Core.UnitTests/Xamarin.Forms.Core.UnitTests.csproj
Xamarin.Forms.Core/Application.cs
Xamarin.Forms.Core/Items/CarouselView.cs [new file with mode: 0644]
Xamarin.Forms.Core/Items/CollectionView.cs [new file with mode: 0644]
Xamarin.Forms.Core/Items/GridItemsLayout.cs [new file with mode: 0644]
Xamarin.Forms.Core/Items/IItemsLayout.cs [new file with mode: 0644]
Xamarin.Forms.Core/Items/ItemsLayout.cs [new file with mode: 0644]
Xamarin.Forms.Core/Items/ItemsLayoutOrientation.cs [new file with mode: 0644]
Xamarin.Forms.Core/Items/ItemsView.cs [new file with mode: 0644]
Xamarin.Forms.Core/Items/ListItemsLayout.cs [new file with mode: 0644]
Xamarin.Forms.Core/Items/ScrollToRequestEventArgs.cs [new file with mode: 0644]
Xamarin.Forms.Core/Items/SnapPointsAlignment.cs [new file with mode: 0644]
Xamarin.Forms.Core/Items/SnapPointsType.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/CarouselViewRenderer.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/CollectionViewRenderer.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/DataChangeObserver.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/EdgeSnapHelper.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/EmptyViewAdapter.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/EndSnapHelper.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/IItemsViewSource.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/ItemContentControl.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/ItemsSourceFactory.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/ItemsViewAdapter.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/ItemsViewRenderer.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/ListSource.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/ObservableItemsSource.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/PositionalSmoothScroller.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/PropertyChangedEventArgsExtensions.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/ScrollHelper.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/SizedItemContentControl.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/SnapManager.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/StartPagerSnapHelper.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/CollectionView/StartSnapHelper.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/ContextExtensions.cs
Xamarin.Forms.Platform.Android/Properties/AssemblyInfo.cs
Xamarin.Forms.Platform.Android/Xamarin.Forms.Platform.Android.csproj
Xamarin.Forms.Platform.UAP/CollectionViewRenderer.cs [new file with mode: 0644]
Xamarin.Forms.Platform.UAP/Flags.cs
Xamarin.Forms.Platform.UAP/Items/FormsGridView.cs [new file with mode: 0644]
Xamarin.Forms.Platform.UAP/Items/ItemContentControl.cs [new file with mode: 0644]
Xamarin.Forms.Platform.UAP/Items/ItemTemplateEnumerator.cs [new file with mode: 0644]
Xamarin.Forms.Platform.UAP/Items/ItemTemplatePair.cs [new file with mode: 0644]
Xamarin.Forms.Platform.UAP/Items/ItemsViewStyles.xaml [new file with mode: 0644]
Xamarin.Forms.Platform.UAP/LabelRenderer.cs
Xamarin.Forms.Platform.UAP/Properties/AssemblyInfo.cs
Xamarin.Forms.Platform.UAP/PropertyChangedEventArgsExtensions.cs [new file with mode: 0644]
Xamarin.Forms.Platform.UAP/Resources.xaml
Xamarin.Forms.Platform.UAP/StepperControl.xaml.cs
Xamarin.Forms.Platform.UAP/TableViewRenderer.cs
Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj
Xamarin.Forms.Platform.iOS/CollectionView/CollectionViewController.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/CollectionViewRenderer.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/DefaultCell.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/DefaultHorizontalListCell.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/DefaultVerticalListCell.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/GridViewLayout.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/IItemsViewSource.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/ItemsSourceFactory.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/ItemsViewCell.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/ItemsViewLayout.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/ListSource.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/ListViewLayout.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/ObservableItemsSource.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/PropertyChangedEventArgsExtensions.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/TemplatedCell.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/TemplatedHorizontalListCell.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/CollectionView/TemplatedVerticalListCell.cs [new file with mode: 0644]
Xamarin.Forms.Platform.iOS/Flags.cs
Xamarin.Forms.Platform.iOS/Properties/AssemblyInfo.cs
Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj
Xamarin.Forms.Platform/Xamarin.Forms.Platform.cs