Xamarin XAML微调器样式问题

Xamarin XAML微调器样式问题,xaml,xamarin,xamarin.android,Xaml,Xamarin,Xamarin.android,我有一个旋转器,我试图提供一个透明的背景。然后在加载时,它可以有一个白色的背景。然而,不管我给它什么背景,它总是白色的!感谢您的帮助 <Spinner android:id="@+id/fertilizer1_amount_unit" android:layout_width="match_parent" android:layout_height="40dp" android:layout_gravity="center_verti

我有一个旋转器,我试图提供一个透明的背景。然后在加载时,它可以有一个白色的背景。然而,不管我给它什么背景,它总是白色的!感谢您的帮助

<Spinner
    android:id="@+id/fertilizer1_amount_unit"
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_gravity="center_vertical"
        android:gravity="center_vertical"
        android:background="#00FF0000"
        local:MvxDropDownItemTemplate="@layout/spinneritemdropdown"
        local:MvxBind="SelectedItem ChemigationItem.Fertilizers[0].Unit;Enabled ChemigationItem.IsNew" />
喷丝头项目下拉列表XAML:

<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res-auto"
    style="?android:attr/spinnerDropDownItemStyle"
    android:singleLine="true"
    android:background="@color/white"
    android:textColor="@color/text_gray"
    android:layout_width="match_parent"
    android:layout_height="?android:attr/listPreferredItemHeightSmall"
    android:ellipsize="marquee"
    local:MvxBind="Text Caption" />
这就是它看起来的样子:


谢谢,

原因是您的CheckedTextView的后台属性:

android:background="@color/white"
实际上应该是这样的:

android:background="@android:color/transparent"

,试图提供一个透明的背景。然后在加载时,它可以有一个白色背景,更改微调器background:android:background=@android:color/transparent,它不起作用吗?哇,对我来说太奇怪了,因为我们还有几个其他微调器使用CheckedTextView,它们的背景是透明的。我把它改成了你建议的,现在它可以正常显示了。谢谢