XF-Material-Library icon indicating copy to clipboard operation
XF-Material-Library copied to clipboard

starting maui migration

Open tuke307 opened this issue 1 year ago • 0 comments

:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Hello material fans, I started the Maui migration process and updated the project. This is not a final solution! Some things are still under development and need to get fixed! I will continue working it, but I need some help. Except UWP, every project can be built. The Android sample is starting but not showing the views.

:arrow_heading_down: What is the current behavior?

no Maui support

:new: What is the new behavior (if this is a feature change)?

Maui support

:boom: Does this PR introduce a breaking change?

Yes

What I have done

  • completely removed Xamarin.Forms and added Microsoft.Maui namespaces
  • renamed internal .Forms namespaces to .Maui
  • replaced Rg.Plugins.Popup with a Maui community version Mopups) which only works for Android and iOS
  • because Color.Default does not exist anymore, i replaced it with null
  • updated nugets: Roslynator.Analyzers, AsyncFixer, IDisposableAnalyzers, Microsoft.Toolkit.Uwp.UI.Controls, Autofac
  • implemented the new OnPlatform structure
  • updated the Readme to the current status
  • replaced Color.FromHex with Color.FromArgb
  • adding braces to the Color.IsDefault, because its now a method
  • static Colors (Yellow, Transparent, ...) are now Color.***
  • added explicit conversation from hardcoded double values to float
  • changed nfloat to System.Runtime.InteropServices.NFloat
  • added a blank line in each .cs file which didn't hadone yet (automatic vs setting)
  • replaced TypeConversion with TypeConverter
  • IList.Foreach() isn't working anymore, replaced with foreach()
  • removed Vapolia.Xamarin.Svg.Forms but didn't replaced it yet

consider/not working

UWP

  • don't load the MaterialMvvmSample.Uwp project (UWP is not supported yet)
  • i haven't really touched the XF.Material.Plattforms.UWP stuff, consider that

Lottie

  • Lottie Animations are not working yet! I am working on implementing SkiaSharp.Extended because LottieXamarin is not upgraded to Maui I commented every lottie stuff (MaterialCircularLoadingView not working for now)

Android

  • Android .SetStatusBarColor don't exist anymore
  • Android ViewGroup cant be accessed anymore

Image Source

  • button image source not filled in samples
  • because I removed Vapolia.Xamarin.Svg.Forms the svg-displaying don't work in the sample project I am working on implementing the native Image

(open the TODO list in VS to see this list)

What do you have to do, to upgrade?

  • follow the Maui Migration at first
  • rename all XF.Material.Forms namespaces to XF.Material.Maui

supports

  • iOS
  • Android
  • [x] All projects build
  • [x] Follows style guide lines
  • [x] Relevant documentation was updated
  • [x] Rebased onto current develop

#444

tuke307 avatar Sep 18 '22 19:09 tuke307