为什么关闭时我的Switch轨道颜色为白色?

时间:2019-03-21 12:35:43

标签: android material-design

这是我选中的开关:

enter image description here

这是我未选中的开关:

enter image description here

我希望它是这样的:

enter image description here

activity_directories.xml

@echo off
setlocal enabledelayedexpansion
for /l %%x in (1,1,1000) do (

    echo Taking ownsership of Folders & Files - loop %%x
    for /f "delims=" %%i in ('takeown.exe /R /A /F "F:\Shares\NetBackup Clients" /D N ^| findstr /i /C:"Failed processing 0 files"') do (
        set "error=%%i"
        if "!errorlevel!"=="0" goto :end
    )

    echo Applying permissions to filestore - loop %%x
    icacls.exe "F:\Shares\NetBackup Clients" /grant "Domain\Group":F /grant "Domain\Group":R /T /C

    echo Finished applying permissions to filestore - loop %%x >> C:\Loopy.txt
)
goto :eof
:end
echo %error% 

colors.xml

<androidx.appcompat.widget.SwitchCompat
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:checked="true"
    android:layout_marginEnd="15dp"
    app:layout_constraintTop_toTopOf="@id/tv_directories_enable_label"
    app:layout_constraintEnd_toEndOf="parent" />

styles.xml

<color name="primaryColor">#ee0000</color>
<color name="primaryLightColor">#ff5f52</color>
<color name="primaryDarkColor">#d90101</color>
<color name="primaryTextColor">#ffffff</color>
<color name="colorAccent">#d90000</color>


<color name="colorPrimary">@color/primaryColor</color>
<color name="colorPrimaryDark">@color/primaryDarkColor</color>
<color name="colorPrimaryLight">@color/primaryLightColor</color>

<color name="textColorPrimary">#ffffff</color>
<color name="textColorDark">#333333</color>
<color name="textColorLight">#777777</color>

我试图替换 colors.xml styles.xml 上的所有白色,但这没有用。我错过了什么?

0 个答案:

没有答案