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

7284 Коммитов

Автор SHA1 Сообщение Дата
Rui Marinho b8c388b819 Update device-tests.yml for Azure Pipelines 2021-03-03 22:39:40 +00:00
Rui Marinho 7b80bb2d5b
Merge branch 'main-handler' into main-maui 2021-03-03 19:32:16 +00:00
Matthew Leibowitz d9a92455bb
[Handlers] Fonts and Label FontFamily, FontAttributes & FontSize (#13888)
* Move all core font logic into an instance

* Doing lots of things to get things working :)

* Add a small compat sample

* Fixed the sample for Android

* Fix the iOS sample

* Clean this up

* revert that

* Added a fonts sample page

* Implement all the things

* Fix things

* Prevent duplicate attributes

* fix null ref warning

* Fix null exception in resizetizer

* Initialize forms because we are actually using it

* Loads of stuff in here, will need to dissect :)

* Create a sln for the build tasks

* fix null ref warnings/errors

* oops

* never null here

* just these

* Only setup the font loader if it exists

* test more things

* Add this back to label

* New attributes

* Add tests for the label

* remove compat samples

* Add iOS tests

* No longer needed

* this

* Add [PortHandler]

* mergies

* this will be cool to keep

* Add resizetizer

* All good now
2021-03-03 19:30:32 +00:00
Patrick Hartman 3d1d087878
Fix Contributing and Code of Conduct links in README.md (#264) 2021-03-03 19:27:58 +00:00
Daniel Hindrikes d85b62fa10
Update README.md (#348) 2021-03-03 19:24:21 +00:00
Rui Marinho a450ffeff5
Fix formatting 2021-03-03 19:18:02 +00:00
Rui Marinho 6c16f5703c
Merge branch 'main-handler' into main-maui 2021-03-03 19:09:41 +00:00
Rui Marinho 34a097fbcc
Merge branch 'main' into main-handler
# Conflicts:
#	Xamarin.Forms.Platform.Tizen/Native/CollectionView/CollectionView.cs
#	Xamarin.Forms.Platform.Tizen/Native/CollectionView/EmptyItemAdaptor.cs
#	Xamarin.Forms.Platform.Tizen/Native/CollectionView/ItemTemplateAdaptor.cs
#	Xamarin.Forms.Platform.Tizen/Native/CollectionView/LinearLayoutManager.cs
#	Xamarin.Forms.Platform.Tizen/Native/CollectionView/ViewHolder.cs
#	Xamarin.Forms.Platform.Tizen/Properties/AssemblyInfo.cs
#	Xamarin.Forms.Platform.Tizen/Renderers/SwipeViewRenderer.cs
#	Xamarin.Forms.Platform.Tizen/Shell/ShellItemRenderer.cs
#	Xamarin.Forms.Platform.Tizen/Shell/ShellNavBar.cs
#	Xamarin.Forms.Platform.Tizen/Shell/ShellRenderer.cs
#	Xamarin.Forms.Platform.Tizen/Shell/ShellSectionRenderer.cs
#	Xamarin.Forms.Platform.Tizen/Shell/ShellSectionStack.cs
#	Xamarin.Forms.Platform.Tizen/StaticRegistrar.cs
#	Xamarin.Forms.Platform.Tizen/ThemeManager.cs
#	src/Compatibility/Core/src/Tizen/Shell/TV/FlyoutItemTemplateAdaptor.cs
#	src/Compatibility/Core/src/Tizen/Shell/TV/FlyoutItemTemplateSelector.cs
#	src/Compatibility/Core/src/Tizen/Shell/TV/TVNavigationDrawer.cs
#	src/Compatibility/Core/src/Tizen/Shell/TV/TVNavigationView.cs
#	src/Compatibility/Core/src/Tizen/Shell/TV/TVShellItemRenderer.cs
#	src/Compatibility/Core/src/Tizen/Shell/TV/TVShellRenderer.cs
#	src/Compatibility/Core/src/Tizen/Shell/TV/TVShellSectionRenderer.cs
#	src/Compatibility/Core/src/Tizen/Shell/TV/TVShellSectionStack.cs
2021-03-03 16:47:35 +00:00
Rui Marinho b59e9d2a33
Merge branch '5.0.0' into main 2021-03-03 16:15:40 +00:00
Jonathan Dick bd64aa9742
Pack Essentials net6 (#13925)
* Build and pack essentials for net6

* Fix net6 pack for essentials

* Fix a property

* Pack net6 version of essentials
2021-03-03 11:12:28 -05:00
Rui Marinho 86a6601e7d
Enable unit tests (#13864)
* [Build] Remove old steps

* Fix reference of unit tests cspro

* Enable xaml unit tests

* [Build] Add build of xaml unit tests

* Try fix targets

* Fix Forms naming

* More naming fixes

* Revert versions

* Remove .Core

* More .Core removals and Fix Platform references

* Add RootNamespace to Build.Tasks

* Fix more Xamarin.Forms old usage

* Fix dll on build.targets

* Fix _XFBuildTasksLocation

* More fixes to _MauiBuildTasksLocation

* More fixes _MauiBuildTasksLocation

* Fix _MauiBuildTasksLocation

* remove debug info

* Remove issues for now

* Rename maps namespace

* Fix Assembly tests

* Fix more targets

* More map rename fixes

* Fix xaml reference on unit tests

* Fix MauiXamlCValidateOnly naming

* More MauiXamlCValidateOnly

* Add xaml page to sample

* Fix namespace on sample page

* oh, yeah

* Fix sample references

* Try run on release the xaml unit tests

* Try continueOnerror

* Update build-windows.yml

* added via the directory props

* ws

* We mights need this

* I think I did this

* This can be reused

* 🤦‍♀️

* this as well after the peppers PR

* Fix some bad renames

* i see

* Fix merge

* Fix sample

* Remove FromSource

* Add the packages

* this

* Yaysies!

* Fix all the non-msbuild tests

* Adding things back and gallery

* this

* Build the tasks first

* Got the Android control gallery running

* remove from the sln

* Xaml pages

* Reference XAML

* this

* better XAML

* this

* restore

* maybe

* include correctly

* symbols

* Try set the versions

* remove unused steps templates

versions things more cool yay

* Updating code to pre-fix xaml

* Now we do the targets

* Revert "Now we do the targets"

This reverts commit 2ce4984d48a00c1eab8037cdd8a35690feb0038e.

* maybe this?

* We have to set the variables

* Add the control gallery and xaml unit tests

* This might help

* xaml page

* Try use matrix for build/release macOS

* Fix variables

* Fix end of script

* use matrix for build on windows

* Fix Artifact upload at same time

Co-authored-by: Stephane Delcroix <stephane@delcroix.org>
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-03-03 15:20:03 +00:00
Seungkeun Lee caab66bcf9
Disable focus on Item when touch swipe was used (#13907) 2021-03-03 09:58:04 +00:00
Shane Neuville dbfe26b33e
Additional changes to propagate measures and arranges between layouts (#13919)
* - fix iOS to use page

* - add additional tests

* Update VisualElement.Impl.cs
2021-03-02 21:52:47 -06:00
Jonathan Dick 6aaa984d78
Make .NET 6 Packable (#13881)
* Add some common nupkg properties to everything

* Remove project property refactored into directory build props

* Remove properties now in common dir build props

* Add net6 version of project

* More net6

* Only target netstandard2.0 now

net4* is no longer needed as there's no more vs2017 support

* Clean up strong naming a bit

* Update dependencies

* Package all the things for build tasks in the -t:Pack

* Add more net6 project versions

* Clean up whitespace

* Needed moar NET6

* Name fixes

* Added meta project for packaging and package script

* Remove assembly copyright (now duplicates)

* Add resizetizer, add params to package script

* Disable strong naming for now

We need to re-evaluate how we do this a bit, we should probably use the `al` tool to do it now, and I believe the StrongNamer package may not work anymore, but we can do the same thing in a custom target at a later date.

* Fix path to tasks assembly

* don't build ios on android specific project

* Finish rename of toolbox file

* - add cake

* - fix cake extras

* fix the copy for the IDE

* Try packing on CI

* versions baby!

* build release

* this should od it

* this

* oops

* Move to an empty folder

* Use new symbol formats

* no symbols for build tasks and the head

* symbol all the things

* Compiler error with commented out code XD

* oopsies

* only build transitive

* Try this

* log everything

* This might work

* REPORTS

* previews

* needed

* versions

* duh

* Update build.cake

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-03-02 12:36:17 -05:00
Shane Neuville 77d789ce7b
Break up legacy and Maui arrange code (#13908)
* Break up legacy and Maui arrange code
* Re-enable the tests (#13906)

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-03-02 03:25:14 +02:00
Jonathan Peppers 31f4f9014b
Use .NET 6 AndroidX packages & consolidate versions (#13879)
Bump to Microsoft.Android.Sdk 11.0.200.118. This is needed for a fix
to support net6.0-android NuGet packages.

We have new AndroidX packages:

    <PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.2.0.7-net6preview01" />
    <PackageReference Include="Xamarin.Google.Android.Material" Version="1.3.0.1-net6preview01" />

These are available on the same feed we have the iOS/Android runtime
packs for .NET 6:

    <add key="xamarin" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json" />

These packs support both Xamarin.Android & .NET 6 because they contain
both sets of assemblies, such as:

* `lib/monoandroid90/Xamarin.AndroidX.*.dll`
* `lib/net6.0-android/Xamarin.AndroidX.*.dll`

To consolidate our AndroidX package versions, we can a new MSBuild
pattern for declaring NuGet package versions that
dotnet/project-system uses:

accdee5926/Directory.Build.targets (L3)
accdee5926/build/import/Packages.targets

1. List packages in `.csproj` files as they are needed. But leave off
   `%(Version)` completely.

2. A `Directory.Build.targets` somewhere does: `<PackageReference
   Update="YourPackage" Version="1.0.0" />` This allows you to put the
   version in one place, and you don't need to check platforms or
   anything, because the `Update` doesn't do anything if the `.csproj`
   file isn't using that package.

We could do this pattern across the whole Maui repo, but I just set
this up for the `AndroidX` and `Microsoft.Extensions` packages for
now.

~~ .NET 6 Linker ~~

Since we are using .NET 6 AndroidX packages, the following workaround
is no longer needed, so I removed them:

    <PropertyGroup>
      <_DotNetPackageVersion>6.0.0-preview.2.21110.7</_DotNetPackageVersion>
    </PropertyGroup>
    <ItemGroup>
      <PackageReference Include="System.CodeDom" Version="$(_DotNetPackageVersion)" />
      <PackageReference Include="System.Diagnostics.EventLog" Version="$(_DotNetPackageVersion)" />
      <PackageReference Include="System.Diagnostics.PerformanceCounter" Version="$(_DotNetPackageVersion)" />
      <PackageReference Include="System.IO.Ports" Version="$(_DotNetPackageVersion)" />
      <PackageReference Include="System.Security.Permissions" Version="$(_DotNetPackageVersion)" />
      <PackageReference Include="System.Threading.AccessControl" Version="$(_DotNetPackageVersion)" />
    </ItemGroup>

Previously, the AndroidX packages were Xamarin.Android libraries, and
they would cause the linker to crash in `Release` builds:

    ILLink : error IL1012: IL Linker has encountered an unexpected error. Please report the issue at https://github.com/mono/linker/issues
      Fatal error in IL Linker
      Unhandled exception. Mono.Linker.InternalErrorException: Step 'LoadReferencesStep' failed when processing assembly 'Maui.Controls.Sample.SingleProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
       ---> Mono.Linker.LinkerFatalErrorException: ILLink: error IL1010: Assembly 'Maui.Controls.Sample.SingleProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' cannot be loaded due to failure in processing 'Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' reference
       ---> Mono.Linker.LinkerFatalErrorException: ILLink: error IL1010: Assembly 'Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' cannot be loaded due to failure in processing 'Xamarin.AndroidX.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' reference
       ---> Mono.Linker.LinkerFatalErrorException: ILLink: error IL1010: Assembly 'Xamarin.AndroidX.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' cannot be loaded due to failure in processing 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' reference
       ---> Mono.Linker.LinkerFatalErrorException: ILLink: error IL1009: Assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' reference 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' could not be resolved
       ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
       ---> System.IO.FileNotFoundException: Unable to find 'System.Security.Permissions.dll' or 'System.Security.Permissions.exe' file

~~ AndroidX obsoleted FragmentStatePagerAdapter ~~

Initially I got several warnings (that became errors), such as:

    error CS0618: 'FragmentStatePagerAdapter' is obsolete...

I don't know what should be done here, so I ignored the warning in the
two files that have a problem for now:

    #pragma warning disable 618
2021-03-01 17:25:45 -06:00
Javier Suárez 80ea75cbae
[Core] EntryHandler Preview (#13788)
* EntryHandlers implementation with Text, TextColor and IsPassword properties

* Update src/Core/src/Platform/Android/EntryExtensions.cs

Co-authored-by: Rachel Kang <rachelkang@microsoft.com>

* Fixed build error

* Update src/Core/tests/DeviceTests/Handlers/Entry/EntryHandlerTests.cs

Co-authored-by: Rachel Kang <rachelkang@microsoft.com>

* Update src/Core/tests/DeviceTests/Handlers/Entry/EntryHandlerTests.cs

Co-authored-by: Rachel Kang <rachelkang@microsoft.com>

* Update src/Core/tests/DeviceTests/Handlers/Entry/EntryHandlerTests.cs

Co-authored-by: Rachel Kang <rachelkang@microsoft.com>

* Use [Category] instead

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
Co-authored-by: Rachel Kang <rachelkang@microsoft.com>
2021-03-01 16:13:32 -05:00
Shane Neuville 06d9d33d52
Wire up Controls.Layouts and Content Page (#13878)
* Wire up Controls.Layouts and Content Page

* - cleanup code

* - cleanup code

* - fix up page renderer

* - add better testing scenario

* - fix tests

* Update MainPage.cs

* Update MauiAppCompatActivity.cs

* - net6 attributes

* - Remove NS from sample

* - give non net6 projects unique assembly names

* - fix accent color

* - fix arrange call

* - PR comments

* - remove cast

* - add system color back
2021-03-01 14:42:59 -06:00
Matthew Leibowitz c521fb3051
Fix CI (#13901) 2021-03-01 12:58:04 +00:00
Javier Suárez bfd6fb7431
[Core] Small Handlers cleanup (#13829)
* Renamed Stubs and added description to Handler tests
* Removed unmapped properties from IButton
* Cleanup the test attributes

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-03-01 14:20:14 +02:00
Matthew Leibowitz ff9847da65
Prevent the locking of build tasks (#13894)
* Instead of locking the build output directly, lock the copy and don't fail the entire build
2021-02-28 21:50:41 +02:00
Matthew Leibowitz 9f47a05e26
Share all the test things (#13882) 2021-02-27 19:28:02 +02:00
Matthew Leibowitz d87fa7c0b9
Fixing the branch name (#13877) 2021-02-27 05:14:49 +02:00
Matthew Leibowitz 939c2c3502
Add Resizetizer.NT (#13784)
* Add Resizetizer.NT

Co-authored-by: Redth <jondick@gmail.com>

* Update the code from the main repo

* Add designer file

* We use tabs

* trailing

* Fix some things

* fix sln

* Rename things

* Moving folders

* whoopsies!

* Nobody saw this

* Update Resizetizer.UnitTests.csproj

* Update Resizetizer.SampleApp.csproj

Co-authored-by: Redth <jondick@gmail.com>
2021-02-26 16:09:23 -05:00
Jonathan Peppers 0e94f1401a
.NET Maui "Single Project" (#13858)
Context: fcd9c30164/Documentation/guides/OneDotNetSingleProject.md

We are aiming to get a new project type working that would have a
`.csproj` such as:

    <Project Sdk="Microsoft.NET.Sdk">
      <PropertyGroup>
        <TargetFramework>net6.0-android;net6.0-ios</TargetFramework>
        <OutputType>Exe</OutputType>
        <SingleProject>true</SingleProject>
      </PropertyGroup>
    </Project>

Within the project you would have:

* `*.cs` all shared code
* `iOS/*` - iOS only stuff, including `Info.plist`
* `Android/*` - Android only stuff, including `AndroidManifest.xml`

I also used some other new settings that results in a smaller
`Info.plist` and `AndroidManifest.xml`:

    <ApplicationTitle>Single Project</ApplicationTitle>
    <ApplicationId>com.microsoft.maui.singleproject</ApplicationId>
    <ApplicationVersion>1.0</ApplicationVersion>
    <AndroidVersionCode>1</AndroidVersionCode>

The eventual goal being we might be able to completely get rid of
`Info.plist` and `AndroidManifest.xml` for simple apps. You would only
need them for edge-case, platform-specific features.

To get this working within a NuGet package, we can include two new
files:

* `Xamarin.Forms.SingleProject.props`
* `Xamarin.Forms.SingleProject.targets`

They only enable things conditionally, if `$(SingleProject)` is set.

I created a new sample with a single `Label` to demonstrate things
working.
2021-02-26 09:07:26 -06:00
Matthew Leibowitz d14a302c91
Fix android tests (#13874)
* check when using new APIs
* add the view to the hierarchy to make sure everything is complete
2021-02-26 10:19:31 +00:00
Matthew Leibowitz e81949278a
Start Running Device Tests (#13762)
* Improve the Android testing

* Add a longer boot timeout for CI (it takes about 5 mins to boot)
* Fail the command if the tests failed
* Pass the arch correctly
Add support for selecting the emulator "skin" or "type"

* Make sure to unify the runs

* fail the build if the tests failed
* copy the test result files to <out-dir>/TestResults.xml

* Just getting something going

* This

* Update device-tests-android.yml

* Run the correct script

* Fix the restore config file

* Install the emulator

* Use separate lines for readability

* Move to a new pipeline

* Renamed

* this

* Update handlers.yml

* test2

* Update device-tests.yml

* Update device-tests.yml

* af

* Update device-tests.yml

* not sure

* Revert "not sure"

This reverts commit 2d722aba9737370fc9c48fa02e3a2b4b02efa769.

* not sure

* Update device-tests.yml

* Update device-tests.yml

* Update device-tests.yml

* sadfasdf

* Update device-tests.yml

* Update device-tests.yml

* Update device-tests.yml

* Run everything correctly again

* change this

* Get some vars

* Better things

* Better name

* Oops

* Update device-tests-android.yml

* Fix the tests

* Test this

* Update device-tests.yml

* Update device-tests.yml

* things

* more

* fix

* disable ios stuff

* need the envvars

* enabling the profiles again

* push the other one

* better

* can't use the shared runtime

* aadsf

* essentials ios

* adfs

* fix things

* change package names

* oops

* Reverts

* finals

* Fix android tests

* Make sure to pass the context to Platform.Init
* Add support for running tests inside an actual Activity
* Prepare to move the shared code into a new assembly for reuse

* move

* quick build to test

* Revert "quick build to test"

This reverts commit dd92838e995d363eab38e699e4ec4c26cf1b3bea.
2021-02-26 10:14:43 +00:00
E.Z. Hart 18aa8e377c
Remove the CheckParameters boilerplate method from handlers (#13855)
* Remove the CheckParameters boilerplate method from handlers

* Rebase and remove more checks
2021-02-26 00:50:18 +00:00
Rachel Kang b4c6187e49
Add iOS Sample config (#13870) 2021-02-26 00:49:53 +00:00
github-actions[bot] 4b59b6f6ce
Automated dotnet-format update (#13872)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-26 00:47:42 +00:00
rachelkang a353851eec
Remove using causing crash 2021-02-25 17:31:44 -05:00
E.Z. Hart 0d0083d304
Fix infinite slider width issue (#13846)
* Fix infinite slider width issue

* Fix inifite width control issue in shim

* Run Android HTRS through ViewHandler.GetDesiredSize
2021-02-25 14:42:57 -07:00
E.Z. Hart 736d0e5c2b Restore xunit customizations 2021-02-25 14:38:13 -07:00
shmin 436194939a
[Tizen] Optimize Shell Flyout for TV (#13833) 2021-02-25 10:18:06 +00:00
Jonathan Dick ac201994f2
Rename all of the things... All of them. (#13847)
* Rename all the things!

* Fix sln on cake

* targets

* Rename all the things!

* Fix sln on cake

* Add this back so the build works

* Added .nuspec\* back

* Remove Core from XamlC

* Update Build.Tasks

* Fix ErrorMessages

* Try fix build

* Update gitignore

* Update Microsoft.Maui-net6.sln

* Fix controlgallery reference

* Fix Maui reference on iOS sample

* Fix ControLGallery sln

* Fix xaml unit tests

* Fix Maps references

* Fix ControlGallery

* Don't build gallery

* Compile 462 for new

* Dont build UAP

* AndroidUseIntermediateDesignerFile

* Fix UAP

* Don't build control gallery for now

Co-authored-by: Rui Marinho <me@ruimarinho.net>
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-02-24 23:50:31 +00:00
E.Z. Hart 253053e9e2
Added Category attribute for tests; Added custom Fact/Theory attributes so (#13842)
DisplayNames are generated from the test method name by default; added custom
DeviceTestCase class to prefix DisplayNames with [Categories] for easier filtering;

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-02-24 10:39:27 +00:00
Rui Marinho 228b3a0c3c
[Handlers] Register handlers and use Microsoft.Extensions for Hosting and Dependency Injection (#12460)
* [Core,Android,iOS] Add AppBuilder and AppHost and sample and tests

* [eng] Add script to measure android startup

* Update src/Platform.Handlers/tests/Xamarin.Platform.Handlers.Benchmarks/HandlersBenchmarker.cs

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>

* [Sample ] Update sample code

* [Tests] Fix hosting tests

* Small cleanup

* [handlers] Add Window and cleanup hosting

* [Controls] Remove xf button

* [Hosting] Remove AppLifetiem for now

* Fix sample code

* [Build] Fix rebase

* [Test] Fix test

* [Build] Remove reference to http package

* [Handlers] Rework Hosting, add option to override ServiceCollection and ServiceProvider, remove usage of Extensions DI

* [Hosting] Refactor to use extensions and rename some Stubs

* [Hosting] Small refactor

* [Hosting] Fix null reference usage on .net6

* [Samples] Install DI extension package on net6 samples

* [Sample] Add Maui.Controls.Sample

* Fix props

* [Sample] Fix sample move to Shared folder

* Revert "[Sample] Fix sample move to Shared folder"

This reverts commit 88980f527be91c028db6b1667a3cf39401ac5757.

* Revert "Fix props"

This reverts commit 3f8467d8251d8b3b7aee8fe3b5e01bbf0711ea6a.

* Revert "[Sample] Add Maui.Controls.Sample"

This reverts commit 3d0ad41544fc8e0ee60d352a028f69bce96e6d8f.

* [Hosting] Add Configuration support

* [Hosting]Add Maui.Controls sample

* [Hosting]Fix sln

* [Hosting] Add net6 Maui.Controls.Sample

* Cleanup

* More cleanup

* Implement iAPP on old sample

* [Hosting] Fix build

* [Hosting] Just use forms on sample , add GetWindow to IApp

* [Hosting] Add HandlersContext to App

* [Hosting] Add MauiAppCompatActivity

* [Hosting] Move HandlersContext to Window

* Remove extra files

* [Hosting] Add MauiApp

* Fix build

* Update Maui.Controls.Sample.iOS-net6.csproj

* Update AssemblyInfo.cs

* Update Maui.Controls.Sample-net6.csproj

* [Hosting] Be able to run old and new registrar

* Add Android resources

* [Android] Add xml resources

* Fix

* Fix unit tests

* [Application] Fix net6 nre

* Cleanuo

* Fix build again

* [Samples] Add essentials init

* Fix net6 build

* - update packagese

* - add handler renderer shim

* - fix link references

* Fix running app on Android

* - fix missing using

* - shim sample

* - add another helper

* [Hosting] Save context on App for now

* [Handlers] Fix sample register ISwitch

* [Hosting] Some renaming

* - delete samples

* - fix CG

* [Hosting] Remove old registrar code

* Remove FormsHandlers

* TODO: Implement legacy attribute scanner with AppHostBuilder

* Fix build

* Enable nullable

* fix formatting

* Fix using old registrar

* use c# 9

* Try fix #nullable

* Don't disable nullable warnings

Use the null-forgiving operator (!) to rather swear that we doin' good

* Fixed the benchmarks and tests with new code

Also split the benchmarks into separate classes for better comparison.

* Fixing some merge issues

* Remove usage of FormsHandlers

* [Hosting] Small refactor , fixing same names

* remove this

* [Hosting] Fix MauiHandlersServiceProvider

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-02-23 20:05:46 +00:00
Matthew Leibowitz bb1c1e79e1
Re-enable tests (#13827) Fixes #13815
* Re-enable tests

Fixes #13815

* NamedSize is correct

* Removing the test that is no longer valid

The previous test was added for https://xamarin.github.io/bugzilla-archives/55/55343/bug.html, but was not really testing anything except what was really a user error.

* Revert "Removing the test that is no longer valid"

This reverts commit 3ae6937db762366baad75f43cd5599aacd79cd42.

* Add issue links
2021-02-23 19:32:33 +00:00
Shane Neuville fe53a5034d
Cast Slider exepected value to int (#13840) 2021-02-23 19:27:36 +00:00
Jay Cho 24cde8e95f
[Tizen] Fix SwipeView Command issue (#13521) 2021-02-23 10:54:39 +00:00
Javier Suárez d443b8f2af
[Handlers] Fixed Slider inconsistent behavior between Android and iOS (#12536)
* Fixed slider inconsistent behavior between Android and iOS

* Removed static variables from Android SliderExtensions

* Updated Platform.cs

* Improve slider on Android

* added more unit tests
* set the new native max to int.MaxValue

* Move the tests back and skip

* Add some events

* remove this

* Redirect to here too

* Fix slider tests for Android API < 26;
Add Android versions for ignored tests;

* - enable slider handler

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
Co-authored-by: E.Z. Hart <hartez@gmail.com>
Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
2021-02-22 17:59:09 -06:00
Matthew Leibowitz 3fd43bdca1
Disable the versioning locally (#13823)
Reduce the tasks needed to run when developing
 - skip the gitinfo install
 - skip the version generation
 - skip the sourcelink
2021-02-22 23:40:04 +00:00
Shane Neuville 8f7779120e
If the measure is invalid don't perform an arrange (#13822)
* If the measure is invalid don't perform an arrange

* Add tests

Co-authored-by: E.Z. Hart <hartez@gmail.com>
2021-02-22 13:13:51 -07:00
Shane Neuville 5ce79d82c4 Fix Device Tests 2021-02-22 14:04:18 -06:00
Shane Neuville 61ce3a6cd3
Remove DevopsNuget.config (#13814)
* Remove DevopsNuget.config

* - keep nuget reference

* - no more cake for you xamarin

* - remove

* - remove adb

* - config

* - test

* - try mme

* - nuget

* - remove config
2021-02-22 18:02:09 +00:00
Shane Neuville c83b2602a9 Merge branch 'main-handler' into maui_main 2021-02-21 17:27:27 -06:00
Javier Suárez d84de5ee16
[Core] Switch Handlers (#12196)
* SwitchHandlers

* Added more SwitchHandler tests

* Fixed build error

* - enabled handler on CG

* Delete launchSettings.json

* Rename SwitchExtensions..cs to SwitchExtensions.cs

* Update Xamarin.Platform.Handlers.csproj

* GitHub adds this newline like a boss

* No newline!!

* - fix merge errors

* - Fix code that renderers view to bitmap

- Convert to using SwitchCompat

* - fix slider naming

* - run all the tests

* Fix compiler error

* - Remove Toggled

* -  extract color state list

* - track ColorStateList

* - organize

* - cleanup

* Delete launchSettings.json

* - more updates

* - fix

* - Simplify down to track color

* - fix defaults

* - fix up iOS track

* Update SwitchExtensions.cs

* - remove non default extensions for now

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-02-21 14:11:10 -06:00
Javier Suárez e6cb5f4e7e
[Core] ButtonHandler Preview (#13771)
* ButtonHandler with Text, TextColor and basic events

* Changes based on PR feedback

* Fixed broken test

* Fix build error

* Removed unused Button properties

* Changes to fix the build error

* Changes in UWP ButtonRenderer to fix build error

* More nullability checks

* LabelHandler with a subset of the properties (Text and TextColor)

* Init LabelHandler

* Fixed build errors

* Updated TexColor property

* Removed not implemented Label properties

* Updated Button.Impl.cs

* Updated FormsHandlers

* Fix up default text color handling

* Fix rebase errors and sample app

* Clean up unused stuff

* Fix interface structure

* Fix stubs

* Delete launchSettings.json

* - fix ontouch

* Move Button.ButtonContentLayout back

* Remove unused types

* Revert unused code

* Add click tests

* - fix setting frame on handler to renderer shim

* - remove button manager

* Update TestBase.cs

Co-authored-by: E.Z. Hart <hartez@gmail.com>
Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-02-21 12:44:04 -06:00
Matthew Leibowitz b3eebf6da5
Remove obsolete (#13813)
* Removed obsolete members

* Fixed a few build errors

* Map renderer build fix

* 2 WPF build fixes

* Removed more IPlatform mentions

* Removed Platform from Tizen FormsApplication

* Removed font property usage from tizen label renderer

* UAP label font build fix

* Resolved conflicts

* Add back the bits for XamlC

* Remove a few more obsolete items

* Color type removed

* Add the new .ctors

* Fix XAML tests

(possibly)

* Add back ctor

* Add back [PortHandler]

* Keep

* Remove tests for removed properties

* Remove previewer tests

* Fix tests

* Make sure it is a string

* Ignore some tests for now

Logged here: https://github.com/xamarin/Xamarin.Forms/issues/13815

* revert font changes

* Add back required method

* Removed test that no longer is valid

* Fix a few more tests

* Oops

* The shims seem to break automation

Co-authored-by: Domagoj Medo <domagojmedo@gmail.com>
Co-authored-by: Domagoj Medo <domagoj.medo@moberg.is>
Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
2021-02-21 12:41:32 -06:00
Javier Suárez 505fc4b41b
[Core] LabelHandler Preview (#13764)
* LabelHandler with a subset of the properties (Text and TextColor)

* Init LabelHandler

* Fixed build errors

* Updated TexColor property

* Removed not implemented Label properties

* Updated Button.Impl.cs

* Updated FormsHandlers

* Fix up default text color handling

* Fix rebase errors and sample app

* Clean up unused stuff

* Fix interface structure

* Fix stubs

Co-authored-by: E.Z. Hart <hartez@gmail.com>
Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
2021-02-20 12:29:28 -06:00