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

4198 Коммитов

Автор SHA1 Сообщение Дата
Shane Neuville 6c9c15c568 Merge branch '4.4.0' 2020-01-06 12:08:23 -07:00
Shane Neuville 643a87aaf8
Registrar frame profile matchup fix (#9100) 2020-01-06 12:07:38 -07:00
Shane Neuville 11a3a0dec3 Don't copy system files to appcenter (#9067)
* Don't copy system files to appcenter

* - only copy some of android
2020-01-06 13:16:43 +00:00
Gerald Versluis b251c29cb1 Fix merge 2020-01-06 12:11:46 +01:00
Gerald Versluis 1b9c22b4b9 Merge branch '4.4.0' 2020-01-06 11:43:40 +01:00
Jonathan Peppers 1ae8fb1cd5 [core] improve Color & Clamp performance (#8884)
* [core] improve Color & Clamp performance

When profiling startup of a HelloForms app on a Pixel 3 XL, I noticed:

    Total(ms) Self(ms)      Calls Method name
            3        1        572 Xamarin.Forms.Internals.NumericExtensions:Clamp (double,double,double)

This method is called multiple times for every `Color` created and
~142 are created on startup. This is why it shows up 572 times for an
app with a single `Label`.

I found there is a `Math.Clamp` implementation in corefx:

6662a0f2fd/src/libraries/System.Private.CoreLib/src/System/Math.cs (L224-L225)

The only difference is this version can throw an exception, so we
could return the incoming value instead. That would be bad to change!

If I rework `NumericExtensions` to use corefx's implementation it is a
bit faster, I did a BenchmarkDotNet comparison running with Mono on
macOS:

     Method |      Mean |    Error |   StdDev |
    ------- |----------:|---------:|---------:|
     Clamp2 |  53.89 ns | 0.668 ns | 0.522 ns |
     Clamp1 |  61.84 ns | 1.270 ns | 2.289 ns |
     Color2 | 112.50 ns | 2.643 ns | 3.705 ns |
     Color1 | 129.03 ns | 2.603 ns | 4.760 ns |

Maybe every `Color` is ~13% faster?

Code for the benchmark is here:

https://github.com/jonathanpeppers/Benchmarks/blob/clamp/Benchmarks/Clamp.cs

Additionally, I reworked the list of default `Color` fields so that
they call a new private constructor that does less math and avoids
`Clamp` completely. We should still keep the original change, as it
would help any cases where the `Color.To*` methods would be used in
apps.

I seem to be able to see a small difference in a Release build running
on a Pixel 3 XL:

    Before:
    12-18 13:04:27.154  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +606ms
    12-18 13:04:30.851  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +589ms
    12-18 13:04:34.601  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +587ms
    12-18 13:04:38.352  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +575ms
    12-18 13:04:42.084  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +583ms
    12-18 13:04:45.802  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +573ms
    12-18 13:04:49.566  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +592ms
    12-18 13:04:53.284  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +583ms
    12-18 13:04:57.015  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +594ms
    12-18 13:05:00.715  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +581ms
    Average(ms): 586.3
    Std Err(ms): 3.05886689260364
    Std Dev(ms): 9.67298643990917

    After:
    12-18 13:08:16.677  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +593ms
    12-18 13:08:20.377  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +577ms
    12-18 13:08:24.107  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +583ms
    12-18 13:08:27.827  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +576ms
    12-18 13:08:31.574  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +586ms
    12-18 13:08:35.324  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +584ms
    12-18 13:08:39.056  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +587ms
    12-18 13:08:42.773  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +586ms
    12-18 13:08:46.523  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +584ms
    12-18 13:08:50.256  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +587ms
    Average(ms): 584.3
    Std Err(ms): 1.56382721409865
    Std Dev(ms): 4.94525586350753

This change seems low risk and would help all platforms.

* One last tweak byte -> int

Doing some reading: https://stackoverflow.com/a/43158214/132442

It seems `int` performs even better than `byte`. I did another test
run with just this change:

    Before:
    12-18 13:37:23.347  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +576ms
    12-18 13:37:27.079  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +575ms
    12-18 13:37:30.828  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +581ms
    12-18 13:37:34.578  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +588ms
    12-18 13:37:38.296  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +572ms
    12-18 13:37:42.046  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +579ms
    12-18 13:37:45.781  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +576ms
    12-18 13:37:49.526  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +586ms
    12-18 13:37:53.276  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +586ms
    12-18 13:37:57.009  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +582ms
    Average(ms): 580.1
    Std Err(ms): 1.70912583243924
    Std Dev(ms): 5.40473043833928

    After:
    12-18 13:35:38.745  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +572ms
    12-18 13:35:42.459  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +572ms
    12-18 13:35:46.209  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +581ms
    12-18 13:35:49.974  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +581ms
    12-18 13:35:53.724  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +574ms
    12-18 13:35:57.474  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +580ms
    12-18 13:36:01.207  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +573ms
    12-18 13:36:04.957  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +568ms
    12-18 13:36:08.707  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +566ms
    12-18 13:36:12.407  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +565ms
    Average(ms): 573.2
    Std Err(ms): 1.87853370714738
    Std Dev(ms): 5.94044517598546
2020-01-05 16:36:09 -08:00
Jonathan Peppers a9dd91bf2c [core] perf improvements for Assembly attributes reflection (#8938)
When profiling startup, I started looking into the number of calls
retrieving custom attributes from assemblies:

    Method call summary
    Total(ms) Self(ms)      Calls Method name
          24        0         301 System.Reflection.RuntimeAssembly:GetCustomAttributes (System.Type,bool)

I saw a pattern such as:

    object[] attributes = assembly.GetCustomAttributes(attrType, true);
    var handlerAttributes = new HandlerAttribute[attributes.Length];
    Array.Copy(attributes, handlerAttributes, attributes.Length);
    RegisterRenderers(handlerAttributes);

We can avoid the allocation and copying of the array completely here.
We can simply cast `attributes` to `HandlerAttribute[]`.

The other thing I saw was:

    string resolutionName = assembly.FullName;
    var resolutionNameAttribute = (ResolutionGroupNameAttribute)assembly.GetCustomAttribute(typeof(ResolutionGroupNameAttribute));
    if (resolutionNameAttribute != null)
        resolutionName = resolutionNameAttribute.ShortName;

This was happening even if the assembly had no `[assembly:Effect]`.

I reordered the code to not look for `[assembly: ResolutionGroupName]`
unless there was an `[assembly: Export]`.

This reduced the calls to `GetCustomAttributes` to:

    Method call summary
    Total(ms) Self(ms)      Calls Method name
          21        0         251 System.Reflection.RuntimeAssembly:GetCustomAttributes (System.Type,bool)

I also did a small amount of refactoring:

* `ReflectionExtensions.GetCustomAttributesSafe` had a variable
  declaration that could be removed.
* `ReflectionExtensions.GetCustomAttributesSafe` was a nice wrapper to
  avoid `#if` and also has a `try-catch` for the previewer. I used
  this in places where there was duplicated code.

~~ Results ~~

    Before:
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    12-17 13:08:57.119  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +588ms
    12-17 13:09:00.852  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +583ms
    12-17 13:09:04.602  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +573ms
    12-17 13:09:08.388  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +581ms
    12-17 13:09:12.137  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +576ms
    12-17 13:09:15.887  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +583ms
    12-17 13:09:19.621  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +578ms
    12-17 13:09:23.388  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +588ms
    12-17 13:09:27.123  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +587ms
    12-17 13:09:30.892  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +571ms
    Average(ms): 580.8
    Std Err(ms): 1.94250697124446
    Std Dev(ms): 6.1427463998877

    After:
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    Launching: com.xamarin.forms.helloforms
    12-17 13:10:29.762  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +579ms
    12-17 13:10:33.514  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +572ms
    12-17 13:10:37.263  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +564ms
    12-17 13:10:40.996  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +572ms
    12-17 13:10:44.748  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +569ms
    12-17 13:10:48.467  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +573ms
    12-17 13:10:52.231  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +577ms
    12-17 13:10:55.981  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +558ms
    12-17 13:10:59.765  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +574ms
    12-17 13:11:03.499  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +569ms
    Average(ms): 570.7
    Std Err(ms): 1.94393644157644
    Std Dev(ms): 6.1472667819844

I think this saves ~10ms on startup on Android, but this should help
all platforms.

These numbers were taken running on a Pixel 3 XL, a Blank
Xamarin.Forms app template using Xamarin.Forms/master.

Using: https://github.com/xamarin/Xamarin.Forms/pull/8867
2020-01-05 16:35:21 -08:00
Shane Neuville 239ba5046a
Exit image code if native control is destroyed (#9034)
* Exit image code if native control is destroyed

* - add uitest

* - ui test

* - remove invalidate override

* - remove extra invalidate
2020-01-05 12:07:20 -07:00
Javier Suárez Ruiz dbb259ff24 [UWP] Added Windows Platform Specific to avoid set the default image directory (#3420) fixes #3228 fixes #2235
* Added Windows Platform Specific to avoid set the default image directory

* Fixed build error

* Renamed ImageSearchDirectory to ImageDirectory

* Fixed build error

* Undo Issue8525 changes

* Revert changes in Issue8525
2020-01-03 13:00:01 +00:00
Kangho Hur a46e974552 [Tizen] Gif Animation Support (#9068) fixes #1704 2020-01-03 12:58:44 +00:00
Durgesh Khandal 4b43f22265 Fix #3798 - [Android] SeparatorColor of ListView is NOT updated dynamically (#8085) fixes #3798
* Fix for dynamic update of Android ListView SeparatorColor and SeparatorVisibility properties

* [Controls]  Add issue 3798 file

* [Controls] Add test category

* Update Xamarin.Forms.ControlGallery.iOS.csproj

Co-authored-by: Rui Marinho <me@ruimarinho.net>
2020-01-03 12:49:16 +00:00
Joe Manke 99c78edc8e [iOS] Add UpdateMode platform-specific to DatePicker and TimePicker (#8048)
* Add UpdateMode to DatePicker and TimePicker on iOS

* Set the values from the Done button, not the EditingDidEnd event, for UpdateMode.WhenFinished

* Formatting
2020-01-03 12:48:01 +00:00
Leo Mehlig b63583dd1f Fixes Bug with TabbedPage pushed onto Shell (#7532) fixes #6384
* fixes issue in android and ios

* Apply the suggested change to have page.Parent?.Parent

Apply the suggested change to fix the "A TabbedPage has no background. See Github6384." issue.

Co-authored-by: Rui Marinho <me@ruimarinho.net>
Co-authored-by: Hadi Zamani <54179804+hadi-zamani@users.noreply.github.com>
2020-01-03 12:45:57 +00:00
Seungkeun Lee 1eee6a8510 Enhance LightweightPlatform (#8873) 2020-01-03 12:40:38 +00:00
shmin d13ba84f12 [Tizen] Fix back button issue in Shell navigation (#8982)
* [Tizen] Fix back button issue in Shell navigation

* [Tizen] Add navigation/back button click effect
2020-01-03 12:14:09 +00:00
E.Z. Hart 3a36e06954 [iOS] Reduce casting and repeat math during BoxView drawing (#9008)
* Reduce casting and repeat math during BoxView drawing

* Drop a few more casts
2020-01-03 12:11:56 +00:00
Shane Neuville 28bba3fd71 Resolve issues with Shell ToolbarItems not reacting to CanExecute Changes (#8889) fixes #8741 fixes #8327
* Fixing various toolbar item display issues

* - fix csproj file

* - added UI test

* - fix possible breaks with Navigation Page

* Fix for 8741: Assert that ToolbarItem is grayed-out (PR 8889) (#8892)

* Assert that ToolbarItem is grayed-out

* Check alpha values on Android

* - fix toolbar item ordering

* - toolbar tracker improvements

* - remove whitespace

* - just use an array from the get go

* - primary

Co-authored-by: Brian Runck <brunck@users.noreply.github.com>
2020-01-03 11:35:34 +00:00
Stephane Delcroix 6edc5ce57c [C,X] Resolve indexers on base class (#8968)
- fixes #8936

this was regressed by #7836
2020-01-02 14:14:08 -08:00
Kangho Hur 9e6235d563 [Tizen] Load image synchronously (#9025) 2020-01-02 11:23:21 -08:00
Daniel Gatto a48474ef74 [Bug] [iOS] [Shell] "Nav Stack consistency error" when Swiping to Dismiss (#8875)
* [iOS] fixed "Nav Stack consistency error" on swipe to dismiss

* Revert "[iOS] fixed "Nav Stack consistency error" on swipe to dismiss"

This reverts commit f26a38ed3c81a78ba7315a78a6bc6cd14c698142.

* [iOS] fixed "Nav Stack consistency error" on swipe to dismiss

* [Shell] added UI Test for swipe to dismiss

* [iOS] fixed "Nav Stack consistency error" on swipe to dismiss

* Revert "[iOS] fixed "Nav Stack consistency error" on swipe to dismiss"

This reverts commit f26a38ed3c81a78ba7315a78a6bc6cd14c698142.

* [iOS] fixed "Nav Stack consistency error" on swipe to dismiss

* [Shell] added UI Test for swipe to dismiss

* [Shell] fixed UI Test for swipe to dismiss (iOS 11/12)

* - cleanup test a little bit

Co-authored-by: Shane Neuville <shane94@hotmail.com>
fixes #8461
fixes #8944
2020-01-02 11:22:57 -08:00
Akihiko Odaki fee5faaca8 [Xaml] Create value from positional argument text of markup extension (#8980)
The behavior introduced with this change conforms to the description of
[MS-XAML-2009] page 80 and 81.
fixes #6905
2020-01-02 11:07:49 -08:00
Gerald Versluis 6c872d31bb Implement fix (#8950)
fixes #8261
2020-01-02 11:07:30 -08:00
melimion ccd693e137 Fix WPF Entry crashes when IsPassword=true (#8645)
* repro

* fix

* use DelayObfuscation
fixes #8644
2020-01-02 11:06:51 -08:00
Andrei 65c6860fc3 [Enhancement] Add platform specific property to handle iOS UITabBar Translucent property (#7315)
* Add iOS specific property to manage UITabBar Translucency property

* removed "private" keyword

Co-Authored-By: Rui Marinho <me@ruimarinho.net>

* removed overkilling constant

Co-authored-by: Rui Marinho <me@ruimarinho.net>
fixes #7135
2020-01-02 11:06:31 -08:00
Shane Neuville c79e187d61 Improve resiliency of Shell when removing/adding items (#9023)
* Add IsVisible property to ShellItem/ShellSection/ShellContent

* - fix formatting

* - simplify interface

* - fix local deploy

* -fixes

* - work

* - check visibility after parent is set

* - fix formatting

* - embedding fix

* - menu item not getting added to Visible Items
- Process Items change on Visible Items

* - fix incorrect cast

* - fix casting

* - fix route testing to not invlude not visible

* - unsubscribe

* - set shell variable

* - remove IsVisible from BaseShellItem

* - fix failing unit test
2020-01-02 14:41:47 +00:00
E.Z. Hart 3ccfecc12d Fix cross-thread exception when finalizing ButtonRenderer (#9010) 2020-01-02 13:04:39 +00:00
E.Z. Hart 1d449cf104 Account for item spacing when providing grouped insets (#8872)
Fixes #8345
2019-12-31 16:40:44 -08:00
James Clancey f885717866 Added sample, and preserve attribute (#9024)
* Added sample, and preserve attribute

* Update Xamarin.Forms.Platform.iOS/EmbeddedFontLoader.cs

Co-authored-by: Shane Neuville <shane94@hotmail.com>
2019-12-28 16:00:10 -07:00
Javier Suárez Ruiz c7e2e822a1 [Android] Fixed Gif animation loading from files (#8865)
* Fixed Gif animation loading files on Android

* Fixed build

* Avoid duplicate code loading gifs from local or resource

* Fixed sample to work on UWP
2019-12-28 04:38:49 -07:00
Shane Neuville 1de59c5e7e Merge branch '4.4.0'
# Conflicts:
#	Xamarin.Forms.Core.Android.UITests/Xamarin.Forms.Core.Android.UITests.csproj
#	Xamarin.Forms.Core.Windows.UITests/Xamarin.Forms.Core.Windows.UITests.csproj
#	Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj
#	Xamarin.Forms.Core.macOS.UITests/Xamarin.Forms.Core.macOS.UITests.csproj
2019-12-27 06:14:18 -07:00
Shane Neuville 74f2ceb9f6 Merge branch '4.3.0' into 4.4.0 2019-12-27 06:12:00 -07:00
Shane Neuville f80d8d2e26
bump Xamarin UI Test (#9009) 2019-12-26 12:28:46 -07:00
shane 9873933ca2 Merge branch '4.4.0' 2019-12-20 21:36:20 -07:00
E.Z. Hart 3ce443cd42 Stop Frame shadow from blocking user input on iOS (#8991) 2019-12-20 21:34:07 -07:00
Shane Neuville 758ca37cb1
Fix UWP Platform project so that it doesn't try to load on VS MAC (#8989)
* Compile as empty library when opened on vsmac

* - more conditionals for uwp

* - centralize uwp targets and props

* - fix props files

* - 2017 hacks

* - import parent props/targets

* - fix map types
2019-12-20 18:26:33 -07:00
Jonathan Peppers 8463685fb6 [android] use Type.GetType() to load AppLinks (#8965)
Reviewing the memory report from the Mono profiler:

    Allocation summary
         Bytes      Count  Average Type name
         13776        123      112 System.Reflection.AssemblyName

That is a lot of `AssemblyName` objects!

I found part of the culprit to be in `AndroidAppIndexProvider`:

    private Assembly GetAssemblyForAppLinks(string assemblyName)
    {
        return Device.GetAssemblies().FirstOrDefault(assembly => assembly.GetName().Name == assemblyName);
    }

Instead of using `System.Linq` to create an `AssemblyName` for every
.NET assembly, we can just use a fully-qualified name with
`Type.GetType`.

The memory results were a bit better:

    Allocation summary
         Bytes      Count  Average Type name
          8176         73      112 System.Reflection.AssemblyName

Since this avoids a bit of System.Reflection & System.Linq, I was able
to see a performance improvement in a Blank Forms app template on a
Pixel 3 XL:

    Before:
    12-18 16:51:16.427  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +586ms
    12-18 16:51:20.133  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +567ms
    12-18 16:51:23.863  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +573ms
    12-18 16:51:27.581  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +571ms
    12-18 16:51:31.362  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +577ms
    12-18 16:51:35.095  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +575ms
    12-18 16:51:38.846  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +578ms
    12-18 16:51:42.576  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +570ms
    12-18 16:51:46.324  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +569ms
    12-18 16:51:50.056  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +576ms
    Average(ms): 574.2
    Std Err(ms): 1.74355957741627
    Std Dev(ms): 5.51361950083609

    After:
    12-18 16:55:04.122  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +571ms
    12-18 16:55:07.805  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +570ms
    12-18 16:55:11.553  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +569ms
    12-18 16:55:15.303  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +574ms
    12-18 16:55:19.020  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +572ms
    12-18 16:55:22.766  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +576ms
    12-18 16:55:26.500  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +573ms
    12-18 16:55:30.264  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +582ms
    12-18 16:55:33.981  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +571ms
    12-18 16:55:37.697  1490  1517 I ActivityTaskManager: Displayed com.xamarin.forms.helloforms/crc6450e568c951913723.MainActivity: +571ms
    Average(ms): 572.9
    Std Err(ms): 1.19675487140108
    Std Dev(ms): 3.78447119452933

I also manually tested adding a reference to
`Xamarin.Forms.Platform.Android.AppLinks` and the code here was still
able to create the `AndroidAppLinks` object.
2019-12-20 11:14:27 -07:00
E.Z. Hart ecb2f39dc1 Stop linker removing custom renderers, services, and effects in Control Gallery (#8975)
* Make sure the linker doesn't remove custom renderers, services, and effects in Control Gallery

* Add missing Preserve attribute to ShadowEffect

* Unbreak TapGestures in Spans on iOS
2019-12-20 11:23:32 +00:00
Shane Neuville 1cf7a4bf71 Merge branch '4.4.0' 2019-12-19 10:33:17 -07:00
Shane Neuville 44dd779647
Package up everything into the PRI file for debug and release builds (#8926)
* Copy files everywhere

* - release test

* - remove from csproj

* - copy more files

* - xaml

* - disable embeddedxbf

* - fix nuget paths

* - move embed property outside of csproj

* - fix nuspec

* - remove extra files

* - fix typo

* - rebuild

* - build uwp on 2019

* - yaaaaaaml typo

* - taaaaaaabs

* - fix what copies

* - cleanup
2019-12-19 10:32:37 -07:00
E.Z. Hart adcff975e8
Stop the linker from killing off the Deserializer (#8962)
* Stop the linker from killing off the Deserializer

* - add a couple moore preserves on iOS
2019-12-19 09:39:13 -07:00
Brian Macomber fe84b86d2f Typo Fix and change to nameof (#8942) fixes #8935 2019-12-19 12:53:23 +00:00
Akihiko Odaki 9f39163575 [XamlC] Dispose assembly resolver constructed by XamlCTask (#8397)
An assembly resolver holds opened files, and leaks if it is not disposed.
It is problematic if you run Xamarin.Forms.Xaml.UnitTests on Linux with
the default configuration because it has a small limit for the number of
opened files. It may cause stability issues also on other platforms,
depending on the situation.
2019-12-19 09:51:28 +01:00
Akihiko Odaki a1a9f6e1be [Xaml[C]] Accept prefixed property names of markup extensions (#5186) 2019-12-19 09:25:40 +01:00
Akihiko Odaki 6c3b4f57fc [XamlC] Support variance (#8535) 2019-12-19 09:23:58 +01:00
Akihiko Odaki 6eafaca536 [Xaml] Throw XamlParseException in MarkupExpressionParser.GetNextPiece (#8447) 2019-12-18 14:30:07 +01:00
melimion 9d019b90ea macOS toolbar improvements (#8146)
* toolbar items fixes

* newlines added

* ToolbarItem with long text added to ToolbarItems ControlGallery page

* comment added
2019-12-18 13:37:48 +01:00
Shane Neuville d40a3d8645 Convert elevation platform specific to correct pixel scale (#8917) 2019-12-18 11:37:21 +00:00
Glenn Versweyveld 7db954e53f [UWP] Null HeaderTemplate and Header if no Title is provided on Picker. (#8160)
* Fix empty header space picker

Fixes #8150

* Removed title to align with original test code
2019-12-18 09:51:05 +01:00
Konrad Müller 8f4c0e4805 [WPF] Frame: Add shadow and padding (#7964)
* Add frame border sample

* Add padding and shadow to frame

* Change name of issue repro to correct issue id

* Correct issue title and platform target

* Improve shadow handling; ensure correct background

* Update Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7963.cs

Co-Authored-By: Gerald Versluis <github@geraldversluis.nl>

* Update Xamarin.Forms.Platform.WPF/Renderers/FrameRenderer.cs

Co-Authored-By: Gerald Versluis <github@geraldversluis.nl>

* Update Xamarin.Forms.Platform.WPF/Renderers/FrameRenderer.cs

Co-Authored-By: Gerald Versluis <github@geraldversluis.nl>

* Update Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7963.cs

Co-Authored-By: Gerald Versluis <github@geraldversluis.nl>

* Update Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7963.cs

Co-Authored-By: Gerald Versluis <github@geraldversluis.nl>

* Add back the precious issue pages

* Correct merge errors

* Remove background workaround
2019-12-17 20:28:36 +01:00
Alexandre Santos Costa 24bb5bb1ec #7875: Android: Button size changes when setting Accessibility properties (#8368)
* Tryed to reproduce the same correction applied to the default implementation

* Added repro sample

* Fixed build error on iOS
2019-12-17 18:50:40 +01:00