MaterialTextField setting background to Transparent not working
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- android
- Área
- mobile-dev
Línea de trabajo
Reproduce el XAML informado con MaterialTextField y BackgroundColor="Transparent" en Android, utilizando las versiones indicadas de Xamarin.Forms y de la biblioteca. Comienza siguiendo el renderizado de Android y el manejo del fondo de MaterialTextField; se considera terminado cuando el campo permanece transparente y el comportamiento está cubierto por una prueba de regresión.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🐛 Bug Report
When setting the BackgroundColor to Transparent on a MaterialTextField the BackgroundColor is still filled with the default color, ignoring the Transparent property on Android. This is tested with a MaterialTextField inside a Grid with a Background image on Android. The Background image is a <Image> component with a rowspan of the total grid rows, and Aspect set to AspectFill. It is not (yet) tested on iOS.
I also tested it without the background image and it results in the same (the Transparent property being ignored).
Expected behavior
The Filled color should be transparent of the MaterialTextField and not default back to the #DCDCDC value.
Screenshots

XAML Code
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="PCS2.APP.Views.Login.LoginPage"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:customControls="clr-namespace:PCS2.APP.CustomComponents;assembly=PCS2.APP"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="False"
Shell.PresentationMode="ModalAnimated"
Shell.TabBarIsVisible="False"
mc:Ignorable="d">
<ContentPage.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="70" />
<RowDefinition Height="70" />
<RowDefinition Height="70" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image
x:Name="PCSBackground"
Grid.Row="0"
Grid.RowSpan="6"
Aspect="AspectFill" />
<Image
x:Name="PCSLogo"
Grid.Row="1"
Aspect="AspectFit"
HeightRequest="70" />
<material:MaterialTextField
Grid.Row="2"
Margin="{StaticResource EntryMargin}"
AlwaysShowUnderline="True"
BackgroundColor="Transparent"
InputType="Email"
Placeholder="E-mail of gebruikersnaam"
Text="{Binding Email}" />
<material:MaterialTextField
Grid.Row="3"
Margin="{StaticResource EntryMargin}"
AlwaysShowUnderline="True"
BackgroundColor="Transparent"
InputType="Password"
Placeholder="Wachtwoord"
Text="{Binding Password}" />
<material:MaterialButton
Grid.Row="4"
Margin="30,16,30,80"
BackgroundColor="#3880ff"
Command="{Binding ExecuteLogin}"
Text="Inloggen" />
</Grid>
</ContentPage.Content>
</ContentPage>
Configuration
Version: 1.7.4
Platform:
- 📱 iOS
- 🤖 Android
- 🏁 WPF
- 🌎 UWP
- 🍎 MacOS
- 📺 tvOS
- 🐒 Xamarin.Forms
Additional information
- Using Xamarin.Forms 4.8.0.1364
- Using Xamarin.Essentials 1.5.3.2
- Targeting framework: Android 10.0 (API Level 29 - Q)
Additional used libraries:
- Splat 9.5.37
- Lenguaje dominante
- C#
- Estrellas
- 633
- Forks
- 150
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Baseflow/XF-Material-Library
-
.Net Maui SupportAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
Baseflow/XF-Material-Library#458 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 50/100
Baseflow/XF-Material-Library#457 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
Baseflow/XF-Material-Library#456 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Baseflow/XF-Material-Library#454 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 58/100
Baseflow/XF-Material-Library#453 ·
Todos los issues de Baseflow/XF-Material-Library
Issues similares
-
agentic-workflows area/Docs partner/agentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/fluentui-blazor#5364 ·
Los mantenedores suelen responder en 1 día
-
.NET triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
microsoft/agent-framework#8811 ·
Los mantenedores suelen responder en 1 día
-
.NET Docs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
getsentry/sentry-dotnet#5637 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
QuantConnect/Lean#9842 ·
Los mantenedores suelen responder en 1 día