xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.63k stars 1.87k forks source link

Visual Material Transparent BackgroundColor is White #13922

Open BaculisBirota opened 3 years ago

BaculisBirota commented 3 years ago

Description

I use Entry with Visual="Material" and set BackgroundColor = "Transparent". If use nuget package Xamarin.Forms-1829-pre6 (or above) and Xamarin.Forms.Visual.Material-1829-pre6 (or above) background color is White (not transparent). The other colors work fine. With Xamarin.Forms and Xamarin.Forms.Visual.Material version 1791-pre5 Transparent color work fine.

Steps to Reproduce

  1. Install nuget package Xamarin.Forms-1829-pre6 (or above) and Xamarin.Forms.Visual.Material-1829-pre6 (or above)
  2. In View write <Entry Visual="Material" BackgroudColor="Transparent"/>

Expected Behavior

Transparent background color

Actual Behavior

White background color

Basic Information

Environment

Show/Hide Visual Studio info ``` Microsoft Visual Studio Community 2019 Версия 16.9.0 VisualStudio.16.Release/16.9.0+31025.194 Microsoft .NET Framework Версия 4.8.04084 Установленная версия: Community Visual C++ 2019 00435-60000-00000-AA229 Microsoft Visual C++ 2019 ASP.NET and Web Tools 2019 16.9.687.37626 ASP.NET and Web Tools 2019 ASP.NET Core Razor Language Services 16.1.0.2107702+c4adaa061f13292143de82a96c71341e50bc4032 Provides languages services for ASP.NET Core Razor. ASP.NET Web Frameworks and Tools 2019 16.9.687.37626 Дополнительные сведения см. на веб-сайте https://www.asp.net/ Azure Functions and Web Jobs Tools 16.9.687.37626 Azure Functions and Web Jobs Tools Extensibility Message Bus 1.2.6 (master@34d6af2) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration. GenerateNotify Extension 1.0 GenerateNotify Visual Studio Extension Detailed Info Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers Mono Debugging for Visual Studio 16.9.7 (df23ba6) Support for debugging Mono processes with Visual Studio. ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info SQL Server Data Tools 16.0.62102.01130 Microsoft SQL Server Data Tools Visual F# Tools 16.9.0-beta.21102.9+7ce7132f1459095e635194d09d6f73265352029a Microsoft Visual F# Tools VisualStudio.DeviceLog 1.0 Сведения о моем пакете VisualStudio.Foo 1.0 Information about my package VisualStudio.Mac 1.0 Mac Extension for Visual Studio Xamarin 16.9.000.271 (d16-9@863670b) Расширение Visual Studio, обеспечивающее разработку для Xamarin.iOS и Xamarin.Android. Xamarin Designer 16.9.0.316 (remotes/origin/d16-9@fdbf64026) Расширение для использования средств Xamarin Designer в Visual Studio. Xamarin Templates 16.9.68 (8e9b569) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms. Xamarin.Android SDK 11.2.0.21 (d16-9/93eab59) Xamarin.Android Reference Assemblies and MSBuild support. Mono: 5e9cb6d Java.Interop: xamarin/java.interop/d16-9@d6d86b2 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.34.1@daff8f4 Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-9@9d8924d Xamarin.iOS and Xamarin.Mac SDK 14.14.2.5 (3836759d4) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support. Адаптер теста для Google Test 1.0 Включает средства тестирования Visual Studio и модульные тесты для Google Test. Условия использования и уведомления сторонних производителей см. в каталоге установки расширения. Адаптер тестов для Boost.Test 1.0 Позволяет использовать модульные тесты, написанные для Boost.Test, в средствах тестирования Visual Studio. Условия использования и Уведомления третьих лиц доступны в каталоге установки расширения. Диспетчер пакетов NuGet 5.9.0 Диспетчер пакетов NuGet в Visual Studio. Дополнительные сведения о NuGet см. на веб-сайте https://docs.nuget.org/ Инструменты C# 3.9.0-6.21124.20+db94f4cc8c78a7cd8cf9cfdae091158d2ba9d974 Компоненты C#, используемые в интегрированной среде разработки. В зависимости от типа и настроек проекта могут использоваться различные версии компилятора. Инструменты Microsoft Azure 2.9 Microsoft Azure Tools для Microsoft Visual Studio 2019 — версия 2.9.40218.1 Инструменты Visual Basic 3.9.0-6.21124.20+db94f4cc8c78a7cd8cf9cfdae091158d2ba9d974 Компоненты Visual Basic, используемые в интегрированной среде разработки. В зависимости от типа и настроек проекта могут использоваться различные версии компилятора. Инструменты Visual Studio для CMake 1.0 Инструменты Visual Studio для CMake Инструменты непрерывной поставки Microsoft для Visual Studio 0.4 Упрощение настройки конвейеров Azure DevOps из интегрированной среды разработки Visual Studio. Мастера Microsoft Visual C++ 1.0 Мастера Microsoft Visual C++ Общие инструменты Windows Azure 1.10 Предоставляет общие службы для использования мобильными службами и инструментами Microsoft Azure. Пакет VC Microsoft Visual Studio 1.0 Пакет VC Microsoft Visual Studio Пакет размещения адаптеров отладки Visual Studio Code 1.0 Уровень взаимодействия для размещения адаптеров отладки Visual Studio Code в Visual Studio Расширение IntelliCode 1.0 Подробные сведения о расширении IntelliCode для Visual Studio Расширения средств для контейнеров Visual Studio 1.0 Просмотр, диагностика контейнеров в Visual Studio и управление ими. Средства Microsoft Visual Studio для контейнеров 1.1 Разработка, запуск и проверка приложений ASP.NET Core в целевой среде. Нажав клавишу F5, можно отправить приложение напрямую в контейнер с отладкой, а клавиши CTRL+F5 позволяют изменить и обновить приложение без повторной сборки контейнера. Средства TypeScript 16.0.30201.2001 Средства TypeScript для Microsoft Visual Studio Средства Visual Studio для контейнеров 1.0 Средства Visual Studio для контейнеров Средства Службы приложений Azure, версия 3.0.0 16.9.687.37626 Средства Службы приложений Azure, версия 3.0.0 ```

Build Logs

Screenshots

Reproduction Link

Workaround

shawyunz commented 3 years ago

And your "xamarin.google.android.material" version plz?

My working package versions:

BaculisBirota commented 3 years ago

And your "xamarin.google.android.material" version plz?

No install package xamarin.google.android.material

Name Version Project
Plugin.Permissions {6.0.1} PCL
Xamarin.Essentials {1.5.3.2} PCL
NETStandard.Library {2.0.3} PCL
Xamarin.Forms.Visual.Material {5.0.0.2012} PCL
Xamarin.Forms {5.0.0.2012} PCL
Plugin.Permissions {6.0.1} Android
Xamarin.Forms {5.0.0.2012} Android
Xamarin.Essentials {1.5.3.2} Android
Xamarin.Forms.Visual.Material {5.0.0.2012} Android
SolidSoft-Lda commented 3 years ago

Any news about this issue ?

alexanderdibenedetto commented 3 years ago

Is this going to be fixed?

RodSanford commented 3 years ago

Still not fixed with Xamarin.Forms 5.0.0.2083

eramrit78 commented 3 years ago

Still not fixed with Xamarin.Forms 5.0.0.2083

jdinnen commented 2 years ago

I have seen this also on Android. I noticed that transparent also becomes black if the device goes into night mode.. I just worked around it by defining the transparent as the desired color and turning off night mode on Android. I already turned off the dark mode on iOS so wasn't seeing the issue there.

AustinAHunter commented 2 years ago

Is there an update on this issue? I see it is still marked as "To Do" for the SR10 project, but I believe SR10 was already released as the most recent public release? Correct me if I'm wrong...

jari-kuipers commented 2 years ago

Is this still an actual issue since when I started tracking this last year? It can't be right?

If and only if this is still a real issue, then I must be rude and say that I can't believe the sorry state that this framework is in.

AustinAHunter commented 2 years ago

I'm afraid you're going to have to be rude, because this is a persistent issue. Surprisingly, it is (and possibly always has been?) just on Android. Go figure, since Google develops Android and is over Material design.

(Image reproduction: iOS - Left, Android - Right) AndroidMaterialBackgroundColor

Obviously, the XAML has the BackgroundColor set to Transparent, with no OnPlatform check.

shawyunz commented 2 years ago

As just tested, fixed with latest update, my package list and versions: Xamarin.Forms 5.0.0.2401 Xamarin.Forms.Visual.Material 5.0.0.2401 Xamarin.Google.Android.Material 1.5.0.2 - (as the "version conflict" warning, downgrade to 1.4.0.6, and still working)


Sorry, I didn't do correctly in my previous test, still not fixed

Muhammadfaizann commented 2 years ago

any update?

tjvg91 commented 1 year ago

No update?

fernandobequir commented 1 year ago

No update?