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

3106 Коммитов

Автор SHA1 Сообщение Дата
E.Z. Hart 03266f580a
[iOS] Add missing null check to `SelectableItemsViewRenderer.SetupNewElement`. (#6057)
* Reproduction

* Automate test

* Handle null element in SetupElement in the SelectableItemsViewRenderer
Fixes #5949

* Add manual test instructions

* Fix build errors
2019-05-06 11:05:29 -06:00
Stephane Delcroix 23cfdd0e69 Merge branch '4.0.0' 2019-05-06 11:29:04 +02:00
Stephane Delcroix b08de7f487 IVT HotReload 2019-05-06 11:25:58 +02:00
Shane Neuville d76044fece changes transition to enter mask (#6066)
fixes #5216
2019-05-03 11:38:46 -07:00
Stephane Delcroix 42b61a8722
report file location on error (#6024) 2019-05-03 20:29:08 +02:00
Akihiko Odaki 92ee64e2f6 [Xaml[C]] Allow to connect to static event handler (#5119) 2019-05-03 20:25:03 +02:00
jcmanke 30b1fd7312 Changed error message when Map.ItemTemplate is a DataTemplateSelector to direct the user to the ItemTemplateSelector property (#5944) 2019-05-03 12:20:03 -06:00
Stephane Delcroix 48f48371db
[X] pass the instance along the rlq (#6007)
allow resourceprovider to track lifecycle of xaml-generated object
2019-05-02 17:51:12 +02:00
Shane Neuville 8a7ee8632e [Android] Fix previewer exceptions with shell (#5955)
* shell preivewer

* nonappcompat hack

* - moove up null check

* internal IsDesignerContext
2019-05-02 11:26:42 +01:00
mkieres 95352c2bef Add B40005 test case (#5912)
fixes #2339
2019-05-01 11:42:21 -07:00
Shane Neuville dbbc5d5413 retain local variable of page so not collected (#6054) 2019-05-01 09:12:41 -07:00
Morten Nielsen 9d3ef85539 Adds the image resouces iOS and Android gallery apps already had to UWP (#6000) 2019-05-01 09:11:46 -06:00
Pavel Yakovlev ac783e63df [UWP] fix ListView renderer (#5144) 2019-05-01 09:03:30 -06:00
James Clancey 8e7938c41b Added new named Font Sizes, iOS Named fonts now all AutoScale based on Accessibility Options (#5985) fixes #5474
* Added new named Font Sizes, iOS Named fonts now all AutoScale

We now use the iOS Prefered Font Scaling stuff so fonts are magical

* Added new named font sizes to the FontSizeConverter
2019-05-01 15:36:06 +01:00
Stephane Delcroix 2aeb9e4d84 [Core] Simplify App.Current (#5994) 2019-05-01 15:23:54 +01:00
Samantha Houts 383fc0d6b7 Merge branch '4.0.0' 2019-04-29 16:45:21 -07:00
Samantha Houts cf5cb580dc Merge branch '3.6.0' into 4.0.0 2019-04-29 16:42:15 -07:00
Shane Neuville 470f97bf18 fix global routes to push onto stack correctly (#6025)
fixes #6016
2019-04-29 16:40:11 -07:00
Muzib cc1206a536 Addresses issue #5854 (#5855)
fixes #5854
2019-04-29 14:39:45 -07:00
Carbaholic 123ecf7619 Fixes _child.Element null reference exception (#5756)
* Fixes _child.Element null reference exception

* Update ListViewRenderer.cs

fixes #5700
2019-04-29 14:37:41 -07:00
ShaneN 37c22eb1cb merge tweaks 2019-04-29 14:14:45 -06:00
ShaneN b3927b617f merge 4.0.0 in master 2019-04-29 14:14:19 -06:00
Shane Neuville 8fe0abc165 additional proguard rules for shell (#6032)
* additional proguard rules for shell

* add property to disable file

fixes #5799
2019-04-27 12:21:30 -07:00
Shane Neuville 5fb29b72c6 add check for null track drawable (#6029)
fixes #5970
2019-04-27 12:18:33 -07:00
Shane Neuville 468e03ed5c [Android] set dialog to null when dismissed (#6031)
fixes #5945
2019-04-27 12:18:08 -07:00
Samantha Houts 0162b1815c
[Android] Use Fast Renderers by Default (#5926)
* [Android] Unseal FastRenderers

* [Android] Flip experimental flag to legacy flag

* Flip flag for testing both renderers & set up custom renderers for testing

* Undo build arg change

This reverts commit 8447fec03b4dff16d8ca96544ec83159670b80d7.

* Fix whitespace

* restore workaround for #2520

* Only use workaround for fast renderers (crashes legacy)

fixes #5724
2019-04-27 12:15:39 -07:00
Shane Neuville c6b287d6eb
fix tizen obsolete errors (#6030) 2019-04-27 11:48:26 -06:00
Shane Neuville 2ca5dbf3b8
[iOS] remove SetPaddingInsets api and just have it pad content and flyout by default (#5990)
* remove content setting api and just set by default

* - address comments and centralize window insets check

* add check if height < 0
2019-04-26 21:29:42 -06:00
Johannes Egger 3fda15ba5a `WpfHelper.FindChildren`: Pass `forceUsingTheVisualTreeHelper` to recursive calls. (#5922)
fixes #5921
2019-04-26 16:00:59 -07:00
Matthew Leibowitz a8d0d7a1d4 [WIP] Unify the image handling (#4915)
* Initial code to get unifiied image handling
 - not yet tested
 - still using FileImageSource in some areas

* Updated the button renderers and added tests for Android

* Updated a few more of the Android renderers
 - also added an `IsEmpty` property to the ImageSource to indicate if this source actually contains data that can be used to try and load an image
 - added a few more "tests"
 - includes the changes for #4916

* A few more changes

* Keep the default page for the sample app

* Changing everything to ImageSource and going from there
 - Android, iOS, UWP and WPF are compiling
 - GTK, Mac and Tizen are not yet finished
 - Added a new interface for UWP to return an IconElement in addition to ImageSource (for app bar buttons)
 - not tested yet, nor are there any tests

* Renamed the property to be more useful

* All of Android is now async
 - still only minimal tests
 - also removed the bits that are in https://github.com/xamarin/Xamarin.Forms/pull/4948

* Update Xamarin.Forms.Platform.cs

* A few fixes to whitespace and nameof()

* Updated iOS and UWP wirth async image sources

* A few fixes and WPF support

* A few fixes for Android after the big merge

* Updated a few more loaders:
 - ios
 - macos
 - tizen
 - gtk

* Fix a few things after the merge

* - cast type to FileImageSource

* fix setting of title content if icon doesn't load

* fix IButtonLayoutManager to return correct control

* remove cast and add pack api

* - fix timing issues with layout/invalidation

* - remove aggresive element invalidations for now

* first set of api changes

* obsolete old apis and create new ones for ImageSource

* obsolete messages and static ordering fix

* add tests

* switch default on windows to show images on tabs

* - XStatic obsolete fix

* fix NPC test and bring back alert check on uwp

Fixes #3207
Fixes #4689
2019-04-26 13:46:13 -07:00
Matt Soucoup b6f10eff04 Add null check in iOS ShadowEffect OnDetached (#5952)
Added a null check in iOS ShadowEffect OnDetached
fixes #5951
2019-04-26 09:15:04 -07:00
Kangho Hur eaeffc4e54 [Material] [Tizen] Adds Xamarin.Forms.Material.Tizen for Visual (#5453)
* [Tizen] Adds Xamarin.Forms.Material.Tizen for Visual

* Update Tizen.NET.MaterialComponent for applying color scheme

* Don't build XF.Material.Tzien on iPhone and iPhoneSimulator

* Fix MCanvas build issue

* Update build-windows.yml for XF.Material.Tizen
2019-04-25 12:01:54 -07:00
yourina f08dcdbfae Add the ShellRenderer for Tizen (#5818) 2019-04-25 12:01:13 -07:00
Shane Neuville fb7f7a25d3
Shell hamburger (#5961)
* Draw the hamburger if the user hasn't supplied an icon

* move variable

* remove excess code

* remove public
2019-04-24 18:36:19 -06:00
Shane Neuville 48606a5f1f
fix infinite loops and remove public apis (#5954)
* fix infinite loops and remove public apis

* - remove comments, fix location to not have implicit

* force uri to be relative on ios when no scheme specified

* address PR comments

* add error message

* reformat absolute uris

* additional suggestions

* Update Xamarin.Forms.Core/Shell/ShellNavigationState.cs

Co-Authored-By: PureWeen <shane94@hotmail.com>

* Update Xamarin.Forms.Core/Shell/ShellUriHandler.cs

Co-Authored-By: PureWeen <shane94@hotmail.com>

* Update Xamarin.Forms.Core/Shell/ShellUriHandler.cs

Co-Authored-By: PureWeen <shane94@hotmail.com>

* Update Xamarin.Forms.Core/Shell/ShellUriHandler.cs

Co-Authored-By: PureWeen <shane94@hotmail.com>
2019-04-24 16:25:12 -06:00
E.Z. Hart 583be22d5c Allow CollectionView items to resize with their content (#5905)
* Add gallery for reproing expanding DataTemplate content;
Allow ItemContentView on Android to expand with content;
Allow ItemContentView on iOS to expand with content;
Fixes #5647

* Improve instructions
Fixes #5721
Fixes #5521

* Apply suggestions from code review

Co-Authored-By: hartez <hartez@users.noreply.github.com>

* Clear binding contexts before recycling cells/viewholders.
2019-04-24 11:30:02 -07:00
Pavel Yakovlev 87a93774ab [Shell, iOS, Android] added tab order on Shell flyout menu items (#5930)
* [Shell, Android] added tab order on Shell flyout menu items

* [iOS mac] fix build

* support iOS
2019-04-23 20:33:09 -06:00
Andrei Nitescu 4699da20d1 Refactoring Map.ItemsSource to use NotifyCollectionChangedEventArgsExtensions (#5689) 2019-04-23 18:00:49 -07:00
Stanislav 2c48f4aba6 [GTK] Fix Padding/Margin properties of Frame element (#5533) (#5764)
Frame's content wrapped into a Gtk.Fixed container since Gtk.Frame itself can't position it's content.
fixes #5533
2019-04-23 17:58:11 -07:00
jcmanke 4373a07361 [Maps] Add MapClicked event (#5317)
* Add MapClicked event to Map

* Android MapClicked implementation

* iOS MapClicked implementation

* UWP implementation of MapClicked

* Null check before sending MapClicked event from renderers

* Rewrote MapGallery page in XAML
2019-04-23 17:57:22 -07:00
Samantha Houts 77fda87ae0
Add unit tests for TabIndexExtensions (#5722)
* Add check to FindNextElement

* Add unit tests for TabIndexExtensions
2019-04-23 17:09:20 -07:00
Jonathan Peppers 78d662ee7d Remove Xamarin.Android.Support.v7.MediaRouter (#5941)
Context: https://github.com/xamarin/xamarin-android/issues/2982

The Blank Xamarin.Forms app template in VS 2019 takes longer to build
than in VS 2017. A little research is showing that this is due to use
of the 28.x support libraries... For example, the build includes ~20
*more* jar files in the template from 2019 than 2017. The
`_CompileDex` step alone goes from ~15.2s to ~18.2s.

This lead me down the road of investigating if we can remove any
support libraries by default in Xamarin.Forms apps. I am also seeing
if there is more we can do in Xamarin.Android for this problem, in
general.

It looks like we can remove:

* Xamarin.Android.Support.v7.MediaRouter
* Xamarin.Android.Support.Media.Compat

Neither of these appear to be used, but have been listed as
dependencies of Xamarin.Forms for a long time.

~~ Results ~~

I made these changes, then did a `Debug` build of
`Xamarin.Forms.ControlGallery.Android.csproj` for comparison.

Comparing dex file sizes (in bytes):

    Before:
    3428092 classes.dex
    3265616 classes2.dex
    6693708 total
    After:
    4938000 classes.dex
    1098772 classes2.dex
    6036772 total

This looks like it could potentially save ~600KB of compiled dex code
on every Xamarin.Forms app.

Comparing methods:

    Before:
    classes.dex  11,492 methods
    classes2.dex 19,451 methods
    total        30,943 methods
    After:
    classes.dex  22,171 methods
    classes2.dex  7,635 methods
    total        29,806 methods

~1,137 methods removed, which should help with the dex limit.

Comparing APK sizes (in bytes):

    Before:
    26442597 AndroidControlGallery.AndroidControlGallery-Signed.apk
    After:
    25741701 AndroidControlGallery.AndroidControlGallery-Signed.apk

~700KB smaller APK, due to less .NET assemblies & dex code.

Comparing build time (this was using dx):

    Before:
    19785 ms  CompileToDalvik                            1 calls
    After:
    18532 ms  CompileToDalvik                            1 calls

Looks like it saved over a second of build time for this project.

Seems like an "easy win", let's do this!
2019-04-23 13:21:21 -06:00
Morten Nielsen cbf2d089fa Avoid LINQ exception (#5933)
* Avoid LINQ exception

If the back button in UWP is pressed, but there's nothing in the backstack, the `Last()` LINQ query will throw `System.InvalidOperationException: 'Sequence contains no elements`
This change avoids that, and just returns false that Forms didn't handle the event.

* Change to use LastOrDefault
2019-04-23 11:18:19 -06:00
Shane Neuville e26d22d77c
add delay to 2951 (#5972) 2019-04-23 11:13:20 -06:00
E.Z. Hart e50775037a [UWP] Allow embedding Forms page in secondary window (#5658)
* Make secondary window work in UWP (fixes #2229)

* Update Xamarin.Forms.Core/Internals/Ticker.cs

Co-Authored-By: hartez <hartez@users.noreply.github.com>
2019-04-22 15:44:12 -07:00
puppetSpace 0850710138 Add UITest for issue 1763 (#5907)
* Add UITest for issue 1763

* Removed restriction for Windows Only. Also added the PreserveAttribute on the classes the test used.
2019-04-22 15:05:54 -06:00
E.Z. Hart a76db1407a
Testing a theory about an unreliable memory leak test (#5964) 2019-04-21 18:41:10 -06:00
Rui Marinho 998dc3534c Merge branch '4.0.0' 2019-04-18 16:27:58 +01:00
Shane Neuville 6c0a9405a2 [Android] move runtime registration of renderers to its own method (#5946)
* move renderer registration to its own method

* - move to static
2019-04-18 16:25:58 +01:00
Shane Neuville dbf4037a31 [Shell] Propagate Page bindings to TitleView and Shell Binding to Flyout (#5934) fixes #5650 fixes #5501
* propagate bindingcontext

* - add exception message and fix poorly named xaml file

* add ui test automation

* - fix unit test to represent new code

* - changed from ui test to unit test

* - propagate visual, parent, bc to titleview

* - style fixes
2019-04-18 16:25:31 +01:00