- 1、本文档共4页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
涉及理论的一字不提,我就一切从简说明教程。反编译framework-res.apk打开反编译后的res/values/style.xml1.查找: style name=Theme把下面的item name=colorForeground@color/bright_foreground_dark/item改为item name=colorForeground@color/transparent/item把item name=colorBackground@color/background_dark/item改为item name=colorBackground@color/transparent /item如图:
2.查找@drawable/screen_background_dark并把这里改为@drawable/my_bg注意:这里就是要把一张半透明并命名为my_bg.png的图片放到drawable-mdpi里面,图片的透明度可根据个人喜好调节。3.查找item name=windowShowWallpaperfalse/item把里面的false改为true4.查找style name=Theme.Black parent=@style/Theme先在这行下面增加一句item name=windowShowWallpaperfalse/item然后把里面两处@color/black都改为@color/transparent如图:
5.查找style name=Theme.Light.NoTitleBar parent=@style/Theme.Light在这一行下面增加一行:item name=windowShowWallpaperfalse/item6.查找style name=Widget.ListView parent=@style/Widget.AbsListView把item name=cacheColorHint?colorBackgroundCacheHint/item改为item name=cacheColorHint@color/transparent/item看到下面一点的style name=Widget.ListView.White parent=@style/Widget.AbsListView里面的item name=cacheColorHint?colorBackgroundCacheHint/item改为item name=cacheColorHint@color/transparent/item如图:
7.查找style name=Theme.WallpaperSettings parent=@style/Theme把下面的item name=windowBackground@drawable/screen_background_dark_transparent/item改为item name=windowBackground@color/transparent /item就这么多内容,这样你的全局背景就可以跟随你的壁纸变化了。进阶篇:让短信程序和MIUI播放器等接受渲染,也跟随壁纸变化这里对apk适用性有点不同,有些apk不能使用这种方法,例如上面的framework-res.apk就不能,根据个人经验,回编译后可以直接签名使用的apk都可以用这种方法。MIUI播放器和MMS.apk原理一样,都可以用这种方法接受渲染。反编译目标apk找到res/values/style.xml,拉到底部,加入一种我们自己编写的style,在这里新编写一种style,代码如下:1. style name=MyTheme parent=@android:style/Theme2. item name=android:windowBackground@drawable/mms_bg/item3. item name=android:windowShowWallpapertrue/item4. item name=android:colorBackgroundCacheHint@null/item5. /style复制代码然后把一张半透的mms_bg.png图片放到drawable-mdip里面去,这张图片的透明度也可以自定。然后回到反编译后的目录,找到AndroidManifest.xml查找关键字application android:label=@string/app_label在这里套用我们编写的风格为主风格,做法如下:在application加入一句android:theme=@styl
文档评论(0)