Kotlin and Android Development featuring Jetpack: SwitchCompat's thumbTint and trackTint being ignored (page 76)

Hi everyone,

maybe I found a solution. Here is what I’ve done:

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/switch_player_type"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:checked="@={player.isHuman}"
            android:enabled="@{player.isIncluded}"
            android:thumb="@drawable/ai_toggle_bg"
            app:trackTint="@color/ai_toggle_color"
            android:visibility="@{player.canBeToggled ? View.VISIBLE : View.INVISIBLE}"
            app:layout_constraintBottom_toBottomOf="@id/edit_text_player_name"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@id/edit_text_player_name" />

i.e. I removed the android:thumbTint attribute and I changed android:trackTint to app:trackTint.
Probably some API has been recently changed.

Hope this helps,
Roberto