android4.2 批改设置背景

android4.2 修改设置背景

设置中的背景主要来主题的设置, 在4.X后, android添加了新的主题: Holo

从Settings/AndroidManifest.xml中找到:

    <application android:label="@string/settings_label"
            android:icon="@mipmap/ic_launcher_settings"
            android:taskAffinity=""
            android:theme="@android:style/Theme.Holo"
            android:uiOptions="splitActionBarWhenNarrow"
            android:hardwareAccelerated="true"
            android:supportsRtl="true"
            android:name=".Screenshot">

 android:theme="@android:style/Theme.Holo",

在Theme中, 定义了window的background, 

<item name="windowBackground">@android:drawable/screen_background_selector_dark</item>

最终会找到以下文件:

frameworks/base/core/res/res/drawable/background_holo_dark.xml
@@ -17,6 +17,7 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android">
     <gradient
             android:startColor="#ff000000"
-            android:endColor="#ff272d33"
+            android:endColor="#ff444444"
             android:angle="270" />
 </shape>

 所以, 只需要修改上面文件对Color的定义, 或者,也可以直接以图片代替,

 

如果不想修改这部分,

也可以通过自定义style来实现背景颜色的修改.