We are very happy to announce this release includes 41 issues / pull requests. Some of these changes are breaking changes, which we will attempt to describe in this blog post.
An overview of all the breaking changes in 6.4.0 can be found in GitHub Pull Requests.
PR#3372 - Tidying up and making startup more consistent
This PR primarily introduces changes to
MvxSetup and inheriting platform specific versions, which are breaking.
A new method
RegisterDefaultSetupDependencies has been added, which creates and registers most types needed for startup. Previously this was spread over multiple method calls different places in
MvxSetup. This method is marked virtual so you can change the behavior of what is happening inside of it. There is also an event you can listen to called
RegisterSetupDependencies if you want to know when setup dependencies have been registered.
Some other methods have had their signatures changed from
void to returning a type. Most of these methods are usually not overriden by Apps.
PR#3461 - Breaking up logic for creating view lookup
This PR introduces a breaking change by adding a new virtual method called
InitializeLookupDictionary which should be used instead of overriding
InitializeViewLookup going forward. This breaks up creating the Views container and creating the dictionary for mapping View to ViewModels.
InitializeViewLookup can with advantange start using
InitializeLookupDictionary to change their View to ViewModel mappings.
PR#3456 - Replace MvxColor with System.Drawing.Color
Since we changed to .NET Standard 2.0 for our core libraries, we now have access to namespaces such as
System.Drawing.Color. Meaning we do not need to have our own color class anymore. For the platform specific implementations of
System.Drawing.Color for Xamarin target frameworks, we use OpenTK which is bundled with Xamarin.
This means if you are using
MvxColor, you should move to use
System.Drawing.Color. We still provide the
MvxColor plugin, which contains converters for bindings and methods to transform
System.Drawing.Color into native
Color and other platform specific colors.
PR#3487 - Fixing RequestTranslator ignores Presentation/Parameter values (Android)
The method signature in the interface
IMvxAndroidViewModelRequestTranslator for the method
GetIntentWithKeyFor has been changed from returning a
Tuple<Intent, int> to returning a
ValueTuple (Intent intent, int key).
The method in the Android View Presenter
CreateIntentForRequest was also changed to take into account the instance of ViewModel passed in as the property
ViewModelInstance on a
MvxViewModelInstanceRequest, instead of trying to create a new one every time.
PR#3501 - Fixing ViewPager ignores Presentation Values
Similar as PR#3487, the Adapters for ViewPager ignores the values in
MvxViewModelRequest. This has been fixed and when Fragments are created for the ViewPager, this should be taken into account.
This was marked breaking as it changes the behavior of ViewPager slightly.
A couple of other highlights includes:
- PR#3431 you can now use a Binding set in the
usingpattern and the disposal of the binding set will call
Apply()on the set.
- PR#3484 which prepares
MvxIoCTestto allow other IoC providers.
- PR#3510 adds additional Android Target Bindings for
- PR#3510 our IoCConstruct method now tries harder to find a best-matching constructor instead of using
FirstOrDefault()and too quickly trying to fall back to defaul constructor.
- Moving from AppVeyor for building packages to using Azure DevOps. This is mainly due to the big amount of time it took AppVeyor to prepare working VS2019 images, while Azure DevOps have had them for a very long time.
- Pushing NuGet packages to Github Package Registry, you can add
https://nuget.pkg.github.com/MvvmCross/index.jsonas your NuGet package source to try out builds from the develop branch. For more information on how to set up this look at GitHub’s Configuring NuGet for use with GitHub Package Registry documentation, right now it needs authentication to consume it.
- We’ve added DependaBot to automate updating of dependencies in MvvmCross.
We would like to thank all the people involved in making all the changes for MvvmCross 6.4.0, all changes from small documentation changes to bigger feature Pull Requests are much appreciated.
You can always find the latest changelog in the root of the repository to see what has changed between versions.
- Prepare MvxIoCTest to allow other IoC providers #3484 (SamuelDebruyn)
- Impliment apply() on dispose of clear binding set #3431 (Tyron18)
- ViewPager ignores Presentation Values #3497
- Prevent null reference when trying to look up latest binding context #3518 (Cheesebaron)
- Fix ctor name in target binding #3511 (Cheesebaron)
- RequestTranslator ignores Presentation/Parameter values #3487 (Prin53)
- Is MVVMCross Compatible with Xamarin.Forms Version 4.0 Shell? #3523
- ContentPage decorated with MvxTabbedPagePresentation not wrapped in NavigationPage #3513
- RequestTranslator ignores Presentation/Parameter values #3482
- LinkageError: No implementation found for void mono.android.text.TextWatcherImplementor.n_beforeTextChanged #3478
- Mvx.IoCProvider.CallbackWhenRegistered’s action is called BEFORE the actual singleton is registered. #3472
- MvxFormsAppCompatActivity is unavailable in Android project #3460
- MvxSpinner classNotFoundException inside fragment #3454
- Bindings not attempted in MvxRecycler item template layout when given item in ItemsSource is null #3424
Merged pull requests:
- Update android-spinner.md #3530 (SebastienForay)
- Don’t try to sign packages for Pull Requests #3525 (Cheesebaron)
- Update ios-uirefreshcontrol.md #3524 (Nerves82)
- Fix presentation hint for non-forms views in forms presenter #3522 (orzech85)
- Example of Android Native View for MvvmCross.Forms #3521 (orzech85)
- Bump Moq from 4.12.0 to 4.13.0 #3519 (dependabot-preview[bot])
- Modal Popover Presentation Crash #3516 (Prin53)
- Cleanup csproj files #3512 (martijn00)
- Add more Android Target bindings #3510 (Cheesebaron)
- Update github-pages gem #3509 (Cheesebaron)
- ViewPager ignores Presentation Values #3501 (Prin53)
- Bump MSBuild.Sdk.Extras from 2.0.31 to 2.0.41 #3496 (dependabot-preview[bot])
- Bump Microsoft.CodeAnalysis from 3.1.0 to 3.2.1 #3493 (dependabot-preview[bot])
- IocConstruct constructor lookup & constructor injection #3491 (SamuelDebruyn)
- Bump Xamarin.Forms.Platform.WPF from 18.104.22.168655 to 22.214.171.1243156 #3490 (dependabot-preview[bot])
- Bump Xamarin.Forms from 126.96.36.199655 to 188.8.131.523156 #3489 (dependabot-preview[bot])
- Update tizen backend implementation #3477 (rookiejava)
- Minor typo #3473 (garyng)
- Bump Microsoft.SourceLink.GitHub from 1.0.0-beta2-19351-01 to 1.0.0-beta2-19367-01 #3471 (dependabot-preview[bot])
- Minor typo in docs #3469 (garyng)
- Bump MSBuild.Sdk.Extras from 2.0.29 to 2.0.31 #3468 (dependabot-preview[bot])
- Breaking up logic for creating view lookup #3461 (nickrandolph)
- Increment Min Android Version #3458 (nickrandolph)
- Replace MvxColor with System.Drawing.Color #3456 (Strifex)
- Bump Microsoft.SourceLink.GitHub from 1.0.0-beta2-18618-05 to 1.0.0-beta2-19351-01 #3451 (dependabot-preview[bot])
- Bump Microsoft.NETCore.UniversalWindowsPlatform from 6.2.3 to 6.2.8 #3448 (dependabot-preview[bot])
- Bump MSBuild.Sdk.Extras from 2.0.24 to 2.0.29 #3447 (dependabot-preview[bot])
- Bump Xamarin.FFImageLoading from 184.108.40.2061 to 220.127.116.112 #3446 (dependabot-preview[bot])
- Bump Microsoft.CodeAnalysis from 2.10.0 to 3.1.0 #3444 (dependabot-preview[bot])
- Bump Microsoft.NET.Test.Sdk from 15.9.0 to 16.2.0 #3443 (dependabot-preview[bot])
- Bump Moq from 4.10.1 to 4.12.0 #3441 (dependabot-preview[bot])
- Bump Newtonsoft.Json from 12.0.1 to 12.0.2 #3440 (dependabot-preview[bot])
- Update value-converters.md #3437 (An0d)
- Switch to Azure Pipelines #3397 (Cheesebaron)
- Tidying up and making startup more consistent #3372 (nickrandolph)