我在我的应用程序中有以下偏好设置屏幕
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<EditTextPreference
android:key="edittexvalue"
android:id="@+id/edittextvalue"
android:title="Title Here"
android:summary="Summary Here"
android:defaultValue="Some Value"/>
<Preference
android:key="customPref"
android:title="Title Here"
android:summary="Summary Here"/>
</PreferenceScreen>
所有东西都能正常工作,但是我的应用程序有自定义背景、文本颜色/大小,但我无法弄清如何格式化PreferenceScreen。我猜你需要将其指向另一个xml?但我不知道需要什么代码以及要进行哪些更改。主要问题是背景颜色,文本看起来还可以,但是背景颜色与我的应用程序不符。所以我想设置一个自定义的背景颜色,比如现在设置为红色(#ff0000)。谢谢任何能帮助我解决这个问题的人。