Settings 如何在暗模式下更改首选颜色?
我有一个带有偏好的偏好屏幕。我想在黑暗模式和正常模式转换期间切换每个首选项的背景色Settings 如何在暗模式下更改首选颜色?,settings,background-color,android-preferences,Settings,Background Color,Android Preferences,我有一个带有偏好的偏好屏幕。我想在黑暗模式和正常模式转换期间切换每个首选项的背景色 <androidx.preference.Preference // In normal mode, its background should be white, in dark mode black android:key="@string/key1" android:title="@string/title1"/> <android
<androidx.preference.Preference // In normal mode, its background should be white, in dark mode black
android:key="@string/key1"
android:title="@string/title1"/>
<androidx.preference.PreferenceCategory android:key="categoryKey"
android:title="@string/title2">
<androidx.preference.Preference // // In normal mode, its background should be white, in dark mode black
android:key="@string/key2"
android:title="@string/title3" />
我是新手。我搜索了一下,但没有找到任何解决办法。有人能帮忙吗