Closed cris-m closed 10 months ago
Hi, seems like a general issue rather than a MauiReactor problem, can you confirm that the problem doesn't exist in .NET MAUI itself?
I have checked in MAUI and everything seems fine. I have fixed the Shadow
issue. Offset
was 0,0
. The text and icon on the button does not even appear on android.
public Button ElevatedButton(string content)
=> new Button(content)
.Padding(24)
.FontSize(14)
.HeightRequest(40)
.CornerRadius(20)
.TextColor(Current.OnBackground)
.BackgroundColor(Current.Background)
.Shadow(new Shadow()
.Brush(Colors.Black)
.Offset(1,1)
.Radius(5)
.Opacity(0.2f))
.FontAttributes(MauiControls.FontAttributes.Bold);
public Button FAB(string icon)
=> new Button()
.ImageSource(icon)
.CornerRadius(16)
.WidthRequest(56)
.HeightRequest(56)
.BackgroundColor(Current.TertiaryContainer)
.FontAttributes(MauiControls.FontAttributes.Bold);
Hi, sorry for the late reply, just looking at the code now. Seems you're setting the Padding to 24 not leaving enough room for the text. Not sure why iOS is working, much probably in that case such a large value is not honored by the system.
Thanks. That was the issue in android. Actually it was a mistake, Button
has Padding(24, 0)
padding in material design
I was learning more about
reactorui-maui
and try to implement material design button and typography. Shadow doesnot appear on the button:In android all the
TextColor
properties doesn't get apply.The
Shadow
doesnot get apply on the elevated button.