Open ganyuss opened 1 year ago
Besides, on Android, initialising with XF.Material.Forms.Material.Init(this, new MaterialConfiguration());
breaks the app. On app open I get
System.InvalidOperationException: Invalid on Color.Default
at Xamarin.Forms.Color.MultiplyAlpha (System.Double alpha) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\Color.cs:151
at XF.Material.Droid.Renderers.MaterialButtonRenderer.SetTextColors () [0x0005c] in Z:\Documents\OpenSource\XF-Material-Library\XF.Material\Platforms\Android\Renderers\MaterialButtonRenderer.cs:89
at XF.Material.Droid.Renderers.MaterialButtonRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x000b2] in Z:\Documents\OpenSource\XF-Material-Library\XF.Material\Platforms\Android\Renderers\MaterialButtonRenderer.cs:55
...
🐛 Bug Report
Whenever I set a custom
MaterialConfiguration
, sizes are broken. The MaterialLabel font sizes are all default sizes, and when I open an alert, I get this exception:This is due to the "addDefaults" parameter to the Material class' constructor. It stops the flow from setting up size resources whenever a custom config is provided.
https://github.com/Baseflow/XF-Material-Library/blob/fef56fb66de1ff7fc198745f200883f6ac489c20/XF.Material/Material.cs#L128-L140
Expected behavior
XF.Material.Forms.Material.Init
should setup sizes correctly when custom configs are set.Reproduction steps
Add this to app resources:
And init the package like this:
Configuration
Version: 1.8.0
Platform: