dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.15k stars 1.74k forks source link

Switch on Android has wrong initial color #18506

Open CayasSoftware opened 11 months ago

CayasSoftware commented 11 months ago

Description

The switch has the wrong initial color (white on white) in its initial state. After toggling to the On state and back to Off, it has the color that is distinguishable from the background. See the following screenshots.

Initial On Off
Screenshot_1699021156 Screenshot_1699021164 Screenshot_1699021168

Steps to Reproduce

  1. Create a new MAUI app
  2. Add a Switch to the page
  3. Launch app

Expected outcome: Switch in initial state looks equal to Off-state Actual outcome: Switch in initial state looks different to Off-state

Link to public reproduction project repository

https://github.com/CayasSoftware/Maui-Switch-Color-State

Version with bug

7.0.96

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android API 34

Did you find any workaround?

No response

Relevant log output

No response

ghost commented 11 months ago

Hi @CayasSoftware. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

CayasSoftware commented 11 months ago

@PureWeen What is the latest stable version I should try?

CayasSoftware commented 11 months ago

Tested with:

Visual Studio Community 2022 for Mac Version 17.6.6 (build 408) Installation UUID: 01e02c52-3e0b-4b03-911a-af06fb1233dd

Runtime .NET 7.0.3 (64-bit) Architecture: Arm64 Microsoft.macOS.Sdk 13.1.1007; git-rev-head:8afca776a0a96613dfb7200e0917bb57f9ed5583; git-branch:release/7.0.1xx-xcode14.2

Roslyn (Language Service) 4.6.0-3.23180.6+99e956e42697a6dd886d1e12478ea2b27cceacfa

NuGet Version: 6.4.0.117

.NET SDK (Arm64) SDK: /usr/local/share/dotnet/sdk/7.0.401/Sdks SDK Versions: 7.0.401 6.0.416 6.0.414 MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks

.NET Runtime (Arm64) Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 7.0.11 6.0.24 6.0.22

Xamarin.Profiler Version: 1.8.0.49 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater Version: 11

Apple Developer Tools Xcode: 15.0.1 22266 Build: 15A507

Xamarin.Mac Version: 9.3.0.18 Visual Studio Community Hash: 9d266025e Branch: xcode14.3 Build date: 2023-09-06 19:52:26-0400

Xamarin.iOS Version: 16.4.0.18 Visual Studio Community Hash: 9d266025e Branch: xcode14.3 Build date: 2023-09-06 19:52:27-0400

Xamarin Designer Version: 17.6.3.9 Hash: 2648399ae8 Branch: remotes/origin/d17-6 Build date: 2023-10-23 17:41:00 UTC

Xamarin.Android Version: 13.2.2.0 (Visual Studio Community) Commit: xamarin-android/d17-5/45b0e14 Android SDK: /Users/sebastian.seidel/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 12.0 (API level 31) 13.0 (API level 33)

SDK Command-line Tools Version: 7.0 SDK Platform Tools Version: 34.0.3 SDK Build Tools Version: 32.0.0

Build Information: Mono: d9a6e87 Java.Interop: xamarin/java.interop/d17-5@149d70fe SQLite: xamarin/sqlite/3.40.1@68c69d8 Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d

Microsoft Build of OpenJDK Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk 11.0.16.1 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk 1.8.0.302 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager Version: 17.6.0.50 Hash: a715dca Branch: HEAD Build date: 2023-10-23 17:41:04 UTC

Android Device Manager Version: 0.0.0.1309 Hash: 06e3e77 Branch: HEAD Build date: 2023-10-23 17:41:04 UTC

Build Information Release ID: 1706060408 Git revision: 3912eca6712af97335aa3a782abaa75ff86ec74a Build date: 2023-10-23 17:39:03+00 Build branch: release-17.6 Build lane: release-17.6

Operating System Mac OS X 14.0.0 Darwin 23.0.0 Darwin Kernel Version 23.0.0 Fri Sep 15 14:43:05 PDT 2023 root:xnu-10002.1.13~1/RELEASE_ARM64_T6020 arm64

XamlTest commented 11 months ago

Verified this on Visual Studio Enterprise 17.8.0 Preview 5.0 with below project: MauiApp2.zip

Repro on Windows 11 and Android 14.0-API34(7.0.96). Not repro on Windows 11 and Android 14.0-API34(8.0.0-rc.2.9373)

jsuarezruiz commented 11 months ago

I will review if could be fixed by https://github.com/dotnet/maui/pull/16252