Support new features of Xamari.Forms (#186)
author유리나/Common Platform Lab(SR)/Staff Engineer/삼성전자 <rina6350.you@samsung.com>
Fri, 3 Apr 2020 02:22:14 +0000 (11:22 +0900)
committer안주원/Common Platform Lab(SR)/Principal Engineer/삼성전자 <juwon.ahn@samsung.com>
Fri, 3 Apr 2020 02:22:14 +0000 (11:22 +0900)
commit2db3904f487a0e199945dd5972448a5836275925
treeaa5b9ccdee92778ae4a5c36aa96ece3f00f1c835
parent200c7f32fcbcd84934b1fc8e17d93b22cefda6ac
Support new features of Xamari.Forms (#186)

* do not throw exeption when target of WeakReference was collected (#9542) fixes #6698

- in TypedBinding.Apply return instead of throwing an InvalidOperationException
- add a null-check in BindingExpression
- add a ControlGallery page to reproduce the issue
- fix #6698

Co-authored-by: Stephane Delcroix <stephane@delcroix.org>
* Fix ObjectDisposedException issues for renderers OnElementPropertyChanged (#9764)

* Update GitInfo.txt

* Fix ObjectDisposedException issues for renderers when they are saved
from garbage collection by a weak referenced property changed handler

Fixes #9431; Fixes #5560; Fixes #8607; Fixes #6587; Fixes #9412;

* Add disposed check for legacy renderers

* Add visual indication that the app is running with legacy renderers

* Revert gitinfo

* Add disposed check to VisualElementTracker

* Asyncify double dispose test

Co-authored-by: Samantha Houts <samhouts@users.noreply.github.com>
* [X] consume trailing spaces in markup (#9850)

- fixes #9212

* [iOS|Android] Fix screen reader order (#9702)

* add nifty test page

* TabIndexes will not skip layouts; will skip disabled/unfocusable views

* [iOS|Android] Standardize logic, don't duplicate TabIndex logic

* fix test case

* [iOS] Make Frame a tab stop

* Update ShellFlyoutRenderer.cs

* [iOS] Hide Master page from Accessibilty when not presented

fixes #4220

* final test case should work without so much explict tabindexing!

* [iOS] Single or no TabIndex = default page order

* No tabindex? No problem!

* [Android] Single or no TabIndex = default page order

* [iOS] Return elements depth first

* copypastestackoverflowofshame

* review comments

* [Android] Let OS handle FocusSearch if we haven't specified more than one TabIndex group

* [Android] Let OS handle FocusSearch if we haven't specified more than one TabIndex group

fixes #9653
fixes #4220
fixes #9191
fixes #8613
fixes #9137
fixes #8691
fixes #7606
fixes #4270
fixes #5879

* [XamlC] use XmlReader for detecting XAML and x:Class (#9922)

Context: https://www.jetbrains.com/profiler/

I was profiling Xamarin.Android project builds with `dotTrace`, and
noticed an `IsXaml` method from XamlC taking time:

    0.07%   IsXaml  •  40/0 ms  •  Xamarin.Forms.Build.Tasks.CecilExtensions.IsXaml(EmbeddedResource, ModuleDefinition, out String)
      0.07%   Execute  •  Xamarin.Forms.Build.Tasks.XamlCTask.Execute(out IList)
        0.07%   Execute  •  Xamarin.Forms.Build.Tasks.XamlTask.Execute

In this build, I had changed only XAML and the netstandard project was
using `<ProduceReferenceAssembly>True</ProduceReferenceAssembly>`.

The project is here:

https://github.com/xamarin/xamarin-android/tree/master/tests/Xamarin.Forms-Performance-Integration

Reviewing `IsXaml`, it uses `XmlDocument` to parse every
`EmbeddedResource` with a `.xaml` extension. The problem with this, is
that `XmlDocument` loads the entire XML file into memory and parses
it. This is a step before the actual work of XamlC, so it is currently
parsing every file twice.

If we switch this code to use `XmlReader` instead, we can read to the
first XML element and stop there to get the information needed. We
don't need to parse the entire file at this step.

The results of building the Xamarin.Forms.Controls project on
Windows:

    Before:
    1973 ms  XamlCTask                                  1 calls
    After:
    1917 ms  XamlCTask                                  1 calls

The same project running on Mono / macOS:

    Before:
    6785 ms  XamlCTask                                  1 calls
    After:
    6224 ms  XamlCTask                                  1 calls

My Mac is a slightly slower machine than my PC, but the big difference
is Mono vs .NET Framework.

* Apply fix from #9195 to Style.cs (#9921) Fixes #9656

Fixes #9656

* Fix SwipeItem cast issue on SwipeView (#9907)

* Fixed SwipeItem parent casting issue

* Recover unnecessary removed line in ControlGallery project

* Added missing onproperty changed

* Add a way to open SwipeView programmatically (#9635)

- fixes #9413

* Implemented programmatically Open method in SwipeView

* Fixed direction validation programmatically opening the SwipeView

* Hide internal SwipeView OpenRequested event

* * #8183 Fix Base Class Selector with Descendent Selection

* #8183 Unit Tests

* #8183 Additional Base Class Selector Tests

* [X] register asm in sourceinfo for xamlc (#10001)

see #9294

* [iOS,Android, UWP] Set Position and CurrentItem when ItemsSource items change (#9854) fixes #9322 fixes #9401 fixes #9432 fixes #9771

* [Android] Update CurrentItem on CarouselView when the ItemSource changed

* Fix sample

* [iOS] Update CurrentItem when ItemSource changess

* [Controls] Fix sample

* [iOS] Fix setting initial CurrentItem

* [UITests] Add UITest for CurrentItem change

* [UItests] Fix iOS test

* [Core] If we keep in the same item we still might need to update the position

* [Controls] Add repo for issue #9322

* [Controls] Fix tests

* [iOS,Android] Use NotifyCollectionChangedEventHandler

* [iOS,Android,Controls] Fix rebase

* [Controls] Fix tests

* [iOS] Fix scrolling to initial position

* [Android] Fix set Currentitem

* [Android] Don't try set a current item if we cleared the collection

* [Controls] Updata sample for issue #9401

* [Android] Reset the ItemDecorations when adding/removing the last index

* [Android] UpdateVisualStates when updating CurrentItem

* [Core] If the position of CurrentItem is the same no need to scroll

* [Controls] Update sample

* [Android] Set new currentitem e position from renderer

* [iOS] Update position from renderer

* [iOS] Add hack for position

* [Tests] Comment test for position, this is done on the platform now

* Set correct content offset when removing previous Carousel slides (#9828)

Co-authored-by: E.Z. Hart <hartez@users.noreply.github.com>
* [Controls] Fix sample

* [iOS] Update CurrentItem

* [UWP] Set Item/position from renderer

* [UWP] Fix NRE when disposing IndicatorView

* [UWP] Fix CurrentItem on collection changes

* Update App.cs

* [Android] Move to internal the NotifyCollectionChangedEventHandler

* [iOS] Fix rebase

* [Android] Don't try set position if no items

* [Controls] Add sample for #9771

* [iOS] Fix issue when collection is empty

* [Controls] Update sample to fix uitests on API19

* [Tests] Remove old unit tests

* [Android] Recycler extension method for center item

* [UWP] Fix extra padding on items

* [UWP] Refactor validate position

{UWP] Don't set position if there's no items

* [Controls] Update samples for CarouselView

* [Android] Fix set position on collection reset

* [iOS] Fix set position on collection reset

* [Android] Fix visual states on android

* [UITests] Wait for gallery button

* [UWP] Handle Scrolled event on CarouselViewRenderer

* [Android] Validate set position out of bounds

[Android] Reset _goToPostio flag when reset source

* [Android] Reset snap when item count changes

* [Android] If we request ScrollTo we should reset the CurrentTargetPosition

* [Android] Small refactor, reset _goToPosition when ItemsSource changes

* [Android] Better fix for issue with SingleSnapHelper

* [Core] Add AnimatePositionChanges and AnimateCurrentItemChanges to CarouselView

* [Android] Add AnimateChanges usage to CarouselViewRenderer

* [UWP] Add AnimateChanges usage to CarouselViewRenderer

* [iOS] Add AnimateChanges to CarouselViewController

Co-authored-by: E.Z. Hart <hartez@users.noreply.github.com>
* [Core] Adds Color.FromHsva (#10054)

* Fixed SwipeView regression issue on iOS (#9464) fixes #9417

* Remove all uses of md5 (#10028)

* Remove all uses of md5

* - fix unit tests

* - fix dualscreen tests

* Update ColorTypeConverter to support HSVA (#10065)

* [Tizen] Provides global Circle Surface for wearable (#10083)

* Embedded fonts fix (#9194)

* Android should use the new FontStuff

* iOS font loading is now more resilant. It returns the loaded font name from the embedded resource!

* iOS now loads any font!

* Font Aliases now work on iOS, Android

* Optimized for Alias, making all the lookups faster

* UWP now works with Font Aliases

* Enable Scrolled event on ListView (#399)

* Enable Scrolled event on ListView

* Fixing logic to get current region

* Applying DIP convert to Scrolled event arguments

* Update syntax

* Removing unnecessary property

* Fix CirclePage.BackgroundImageSource (#214)

* Change protection level for CircleScrollViewRenderer (#222)

* Add IsWrapEnabled Property in CircleStepper (#224)

* Add IsWrapEnabled Property in CircleStepper

* change CreateAttached() to create()
31 files changed:
src/XSF.Build.Tasks/SetPropertiesVisitor.cs
src/XSF.Build.Tasks/XamlTask.cs
src/XSF/Tizen.Wearable.CircularUI.Forms.Renderer/CircleStepperRenderer.cs
src/XSF/Tizen.Wearable.CircularUI.Forms.Renderer/NativeCirclePage.cs
src/XSF/Tizen.Wearable.CircularUI.Forms/CircleStepper.cs
src/XSF/Xamarin.Forms.Core/BindingExpression.cs
src/XSF/Xamarin.Forms.Core/CheckBox.cs
src/XSF/Xamarin.Forms.Core/Color.cs
src/XSF/Xamarin.Forms.Core/ColorTypeConverter.cs
src/XSF/Xamarin.Forms.Core/Crc64.cs [new file with mode: 0644]
src/XSF/Xamarin.Forms.Core/FontRegistrar.cs
src/XSF/Xamarin.Forms.Core/IPlatformServices.cs
src/XSF/Xamarin.Forms.Core/Items/CarouselView.cs
src/XSF/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Application.cs [new file with mode: 0644]
src/XSF/Xamarin.Forms.Core/Style.cs
src/XSF/Xamarin.Forms.Core/StyleSheets/Selector.cs
src/XSF/Xamarin.Forms.Core/SwipeEventArgs.cs
src/XSF/Xamarin.Forms.Core/SwipeItems.cs
src/XSF/Xamarin.Forms.Core/SwipeView.cs
src/XSF/Xamarin.Forms.Core/TabIndexExtensions.cs
src/XSF/Xamarin.Forms.Core/TypedBinding.cs
src/XSF/Xamarin.Forms.Core/UriImageSource.cs
src/XSF/Xamarin.Forms.Platform.Tizen/EmbeddedFontLoader.cs [changed mode: 0755->0644]
src/XSF/Xamarin.Forms.Platform.Tizen/Extensions/FontExtensions.cs [changed mode: 0755->0644]
src/XSF/Xamarin.Forms.Platform.Tizen/Forms.cs [changed mode: 0755->0644]
src/XSF/Xamarin.Forms.Platform.Tizen/FormsApplication.cs
src/XSF/Xamarin.Forms.Platform.Tizen/Native/ListView.cs
src/XSF/Xamarin.Forms.Platform.Tizen/PreloadedWindow.cs
src/XSF/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
src/XSF/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
src/XSF/Xamarin.Forms.Xaml/MarkupExpressionParser.cs [changed mode: 0644->0755]