Граф коммитов

19 Коммитов

Автор SHA1 Сообщение Дата
Rui Marinho c2dae0788c
[Android,iOS] Add Visual States to CarouselView items (#8785) fixes #7904 fixes #7997 fixes #8671
* [iOS] Add CarouselView states

* [iOS] Update method naming UpdateVisualStates

* [Android] Add Visual states to CarouselView items

* Update ExampleTemplateCarousel.xaml

* [Android] Implement Visual states for carousel items

* [Android] Cleanup on CarouselViewRenderer

* [Android] Add default state to view

* [Android] Fix when we update vsm

* [Android] Rollback change on adapter

* Update CarouselViewRenderer.cs

* [Android] Update States also when ScrollTo is requested

* [Android] Fix Teardown CarouselViewRenderer

* working-fix7904

* Cleanup

* Update App.cs

* [iOS,Android] Set initial position

* [Controls] Update sample Carousel

* [Core] Update current position on scroll

* [Controls] Cleanup

* [Core] Don't update position if we are scrolling to

* [Android]Rename  ScrollsToAction

* [ANdroid] Remove extra ScrollTo

* Update CarouselViewController.cs

* Cleanup

* [Android] Fix initilization Android CarouselView

* [iOS,Core] Add VisibleViews to CarouselView iOS

* [Android] Populate VisibleViews

* [Core,iOS,Droid] Move to a mroe explicit name for platform initialized

* [Core] Remove not used VisualState

* [Android] Fix scrollto when layout loads

* [Controls] Fix Carousel example gallery

* [Android]Better fix for ScrollTo when loading the RecyclerView

* [Android] Null check for eventhandler

* [iOS] Update if any ScrollToaActions exist

* [iOS, Android] Fix spelling CarouselViewRenderer

* [Android] Rename CarouselViewwOnGlobalLayoutListener
2020-01-31 20:12:13 +00:00
Samantha Houts e80cba6ff7 Merge branch '4.4.0' 2019-12-09 12:56:54 -08:00
Javier Suárez Ruiz ee1eca51d5 Added Converter to simplify the use of Layouts in the CarouselView (#8665)
fixes #7813
2019-12-09 11:57:38 -08:00
Stephane Delcroix abe544ed2b Merge branch '4.4.0' 2019-12-02 11:25:47 +01:00
Rui Marinho 67f7eda2cc
[Core,iOS,Android] Remove NumberOfSideItems (#8614)
* [Core,iOS,Android] Remove number of side items

* [Controls] Fix IndicadorCodeGallery
2019-11-27 17:52:46 +00:00
shane 87d720c71e Merge branch '4.4.0'
# Conflicts:
#	Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs
#	Xamarin.Forms.Core/Button.cs
#	Xamarin.Forms.Core/IImageElement.cs
#	Xamarin.Forms.Platform.iOS/Renderers/ShellSectionRootHeader.cs
2019-11-23 17:19:34 -07:00
Andrei 309dacd229 Added IndicatorsView (#7465)
* Added IndicatorsView

* removed static ctor

* refused plural in naming

* opened ItemsSource property

* followed code convention

* renamed IndicatorView (removed plural)

* made Color.Default as initial value

* updated IndicatorSize initial value

* Added IndicatorViewExtensions

* naming changes

* fix build

* small cleanup

* refactored control to templatedView

* added UIPageControl renderer for iOS

* moved extensions class to separate file

* removed useless private methods

* local vars name refactoring

* tapGesture naming update

* avoided linq

* code styling

* fixed default indicator colors for iOS

* added experimental flag

* [Core]Update api naming for IndicatorView

* Update IndicatorView.cs

* [Core] Add forms visual

* Revert "[Core] Add forms visual"

This reverts commit 380f36684ebf1d90ce8df074c13f70f8549ba8db.

* Revert "Revert "[Core] Add forms visual""

This reverts commit 6619e9e758970de3c11672ed2fb181dc37fe6ad0.

* [Gallery]Revert changes to gallery

* [Android] Export default renderer for FormsVisual

* [iOS] Handle FormsVisual for IndicatorView

* [iOS] Update Position from native renderer

* [iOS] IndicatorVIewRendederer updates and dispose

* [Controls] Fix merge

* Added IndicatorView Core Gallery sample

* Add  IndicatorSample

* Update Xamarin.Forms.Controls.csproj

* [Core] Fix FormsVisual check

* [iOS] Fix FormsVisual check

* [Controls] Fix Indicator Gallery sample

* [Core] Cleanup IndicatorView

* [Core]Fix toogle between template and shapes on FormsVisual

* [Controls] Fix indicators samples

* [Controls] Fix IndicatorTemplate

* [Core] Add ItemsSourceBy xaml option

* [iOS,Android,Core] Add IndicatorStacklayout

* [Android] Remove extra renderer for FormsVisual

* [Controls] Remove Visual from Indicator sample

* [Core, iOS, Android] Fix bug on IndcatorView

* - remove forms visual

* - remove extra shared

* - remove forms visual

* - remove disposable

* - remove renderer from tizen
2019-11-22 18:09:32 -07:00
E.Z. Hart 1ce747e5ea Remove ItemSizingStrategy from CarouselView (#8588)
* Move ItemSizingStrategy

* Fix tests

* Fix Android

* Fix Tizen

* Fix iOS
2019-11-21 15:53:39 +00:00
Javier Suárez Ruiz 4b213a51e7 [UWP] Implement CurrentItem on CarouselView (#7590)
* Implement CurrentItem on CarouselView UWP

* Removed unnecesary VerticalListItemsPanel (Carousel)
2019-11-18 19:24:54 +00:00
E.Z. Hart 98d9245eb4
Remove requirement for CollectionView Experimental flag (#7907)
* CollectionView_Experimental is dead; long live CarouselView_Experimental!

* Change CollectionView enabling button labels to CarouselView for CarouselView tests

* Fix UI tests for Carousel

* Honor the CollectionView_Experimental flag for CarouselView

* Update Issue6963.cs

* Update Issue7817.xaml.cs

* Remove collection view flag settings
2019-10-16 09:44:47 -06:00
Javier Suárez Ruiz 8da3ccf8e8 Fixed issue setting Position in CarouselView (#7901) fixes #7865
* Added sample file

* Updated sample

* Fixed the issue on Android and iOS

* Updated IsScrolling property from UWP CarouselView renderer

* Added repro sample instructions

* Update Issue7865.xaml.cs

* [iOS] Update IsScrolling from renderer
2019-10-15 15:37:40 +01:00
E.Z. Hart f524502aee [UWP] Make EmptyView work in UWP CarouselView (#7724)
* Make EmptyView work in UWP CarouselView

* Update Xamarin.Forms.Core/Items/CarouselView.cs

Co-Authored-By: Samantha Houts <samhouts@users.noreply.github.com>
2019-10-01 17:12:08 +01:00
Rui Marinho 599a0a4d4d
[iOS,Android] Better way to get CurrentItem (#7587)
* [iOS] Fix finding center cell

* [UITests] Fix drag on vertical  

* [UItests] Make uitest more reliable

* [iOS] Simplify set current item

* [Android] Use scrolled to get CurrentItem

* [UITests] Fix UItests on api19 android

* [Android] Fix merge
2019-09-24 00:02:47 +01:00
E.Z. Hart 5c2811a414 Fix horizontal layout issues introduced in 7456; fixes #7519 fixes #7524 (#7522) 2019-09-16 15:23:55 +01:00
E.Z. Hart a68dd21dc0 Remove extra properties from CarouselView API (#7456)
* Remove Header/Footer properties from CarouselView

* Limit CarouselView to LinearItemsLayout

* Rework inheritance for UWP

* Split files by class

* Fix up Tizen renderer
2019-09-13 10:55:27 +01:00
Javier Suárez Ruiz 825dc53166 Hide some CarouselView methods from IntelliSense (#7475)
* Hide SetCurrentItem and SetIsDragging CarouselView methods from Intellisense

* Added required using to use EditorBrowsable
2019-09-12 00:40:26 +01:00
Javier Suárez Ruiz 79dd23edcb [Android, iOS] Fix CarouselView Issues (#7366)
* Fixed CarouselViewGalleries sample on Android

* Protect NRE setting the CurrentItem

* Fixed issue changing the ItemsSource

* Fixed issues with NumberOfSideItems and PeekAreaInsects properties on Android

* Fixed formatting

* Fix ItemSpacing issue on Android

* Fixed vertical peek insets iOS

* Center item after change ItemSpacing
Improve IsSwipeEnabled logic on Android (disable swipe but not touch)

* Update max slider value when item count is updated

* Update CarouselCodeGallery.cs

* NoOfSideItems in test page
2019-09-04 14:48:51 +01:00
Rui Marinho 09acfd48d4 [Feature] CarouselView (#5044)
* [Spec] Draft carousel

* [Core,Spec] Add IndicatorsView

* [iOS] IndicatorsViewRenderer and CarouselVieRenderer draft

* [Controls] Fix controls gallery linker

* [Core] Remove extra file

* Fix Remove IITemsSource

* [iOS] Implement Scroll and selected item

* [iOS,Android,Core] Refactor to use CurrentItem on CarouselView

* [iOS,Core] Add NumberOfVisbileItems

* [iOS,Core] Add IsScrolling and IsDragging

* [iOS,Core] Add Visual state for carousel items

* [iOS,Core] Add padding to CarouselView

* [iOS,Controls] Fix sample, disable selection on CarouselViewController

* [Core] Add Delta to ScrolledDirectionEventArgs

* Update SelectableItemsViewRenderer.cs

* [Controls] Refactor Carousel examples

* [Controls] Fix csproj

* [iOS] Fix bug with insets with carouselview padding

* [Controls] Fix vm for CarouselXamlGallery

* [Controls] Collection Carousel type demo

* [Core] Add other CarouselView Layouts

* Fix Carousel rebase (#6518)

* Fix rebase Android

* Fix rebase iOS

* Update ItemSizingStrategy

* [Core] Add ItemSizingStrategy None

* [iOS] Allow to override ReuseId and RegisterCells from ItemsViewController

* Remove IndicatorsView

* Remove ICarouselViewController

* Implemented IsDragging on Android

* Implemented Scrolled for Android

* Removed Spacing methods

Spacing is now available on a lower level and we don't need to worry about it

* Fix rebase

* [UnitTests] Add basic CarouselView unit tests

* [iOS] Update CarouselViewLayout

* [iOS,Core] Remove Padding and add PeekAreaInsets

* [iOS] Fix peek area insets update on CarouselView

* [iOS,Core] Remove extra scroll code update

* [iOS] Fix bug ScrollAnimationEnded missing

* [Core] Mark BPK as private

* [Core] Rename NumberOfSideItems

* Update ItemsViewRenderer.cs

* [Android] Remove scroll direction update

* First small UI tests

* [iOS] Carousel Apply suggestions from code review

Co-Authored-By: Samantha Houts <samhouts@users.noreply.github.com>

* More UI tests and plumbing

* Fix build errors

* [Android] Fix CarouselView sizing on Android

* Implemented IsSwipeEnabled iOS

* Implemented bounce iOS

* Merged with scroll changes ItemsView

* Implemented IsBounceEnabled Android

* [Android] Update position

* Update App.cs

* Added CarouselView Core Gallery sample

* Update ItemsViewController.cs

* Fixed Core Gallery problems with Linker

* Added more CarouselView properties to the Core Gallery sample

* Added new CarouselView sample adding and removing items, etc.

* [Android]Add spacing inset for fist and last item

* [Android] ScrollTo and center item on carousel

* Spelling and not breaking build

* [Android]Use SnapHelper to get centered view

* Make Position work (again) for iOS

* Rebase from master (fixed conflicts)
Fixed Android bug related with the first item inset calcs.
fixes #4996
2019-08-29 16:26:23 -07:00
E.Z. Hart aabe44fe7d [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
2018-11-13 12:49:08 +00:00