0
我试图在preferences.xml
上更改背景颜色。默认颜色是白色。有没有办法改变它?它也将应用于preferences.xml
子屏幕。在preferences.xml上设置背景颜色
在这里,我使用自定义“drawable”来设置背景颜色。可绘制的文件名是bg_gradient.xml
。这里是我的代码:
RES /绘制/ bg_gradient.xml
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:angle="270"
android:gradientRadius="750"
android:endColor="@color/bg_gradient_end"
android:startColor="@color/bg_gradient_start"
android:type="linear" />
</shape>
在此先感谢。