Hello,
This issue is reported in the MAUI GitHub page:Some properties not updating (eg VisualState setter not working for Button BackgroundColor) with AOT enabled #11662
And I notice you have added comments in this thread. Please waiting for mattleibow's update about using ViewHandler.
Or you can disable the AOT by adding <RunAOTCompilation>false</RunAOTCompilation>
in the .csproj
file. Then release an APK file. It is working in my side.
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.