Reputation: 851
I'm using a switch on my MAUI project. I found a style issue on Android devices 10 and 11, but on Android 12, there is no style issue.
Below is the screenshot on the Android 10 and Android 11.
Below is the screenshot on the Android 12.
Code:
<Switch
x:Name="sms_switch"
ThumbColor="#5abcd7"
OnColor="#5abcd7"
Toggled="SMSToggledEvent"
VerticalOptions="CenterAndExpand"
HorizontalOptions="StartAndExpand"/>
Can you please help me to fix this issue?
Upvotes: 1
Views: 544
Reputation: 851
I tried a lot of way to fix this UI issue but didn't get any solution. Finally I used switch on and off icons and resolved.
This is not a solution but a way to fix the UI issue.
Upvotes: 1
Reputation: 14509
I can't reproduce your problem. I created two new projects to test your code.
I used Visual Studio version 17.9.0 Preview 1.1.
In addition, I found the similar issue on the github: Switch thumbcolor cannot be set in code and Switch on Android has wrong initial color. You can follow up them.
Upvotes: 0