增加可选壁纸:
1.
制作
wallpaper_xxx.jpg (960*800)
wallpaper_xxx_small.jpg (213*189)
拷贝图片到 /android/a10/android-4.0/android4.0/packages/apps/Launcher2/res/drawable-nodpi目录;
2.
在packages/apps/Launcher2/res/values-sw600dp/wallpapers.xml 中加入我们的壁纸
<item>xxx</item>
修改默认壁纸:
1
复制 wallpaper_xxx.jpg 为default_wallpaper.jpg,(1920*1280)
拷贝到frameworks/base/core/res/res/drawable-large-nodpi/default_wallpaper.jpg
其他拷贝,
frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.jpg (960*800)
frameworks/base/core/res/res/drawable-large-nodpi/default_wallpaper.jpg (1920*1280)
frameworks/base/core/res/res/drawable-xlarge-nodpi/default_wallpaper.jpg (1920*1280)
:::
静态壁纸
Android V2.3版本上:
替换frameworks/base/core/res/res/drawable/default_wallpaper.jpg图片
Android V4.0版本上:
替换frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.jpg图片
动态壁纸
修改frameworks/base/core/res/res/values/config.xml文件中
找到<string name=”default_wallpaper_component”>@null</string>
修改为
<string name=”default_wallpaper_component”>com.android.wallpaper/.nexus.NexusWallpaper</string>
其中com.android.wallpaper/.nexus.NexusWallpaper,”/”前为包名,后为类名