level 12
弄之前的准备工作
1.成功安装apktool并导入framework-res.apk
2.对systemui.apk和systemui.odex进行合并
3.下载jota+或者类似文本编辑器
2014年12月14日 15点12分
2
level 12
1 、反编译SystemUI.apk
打开res/layout/status_bar.xml
在你喜欢的位置添加如下代码
2014年12月14日 15点12分
3
level 12
<include android:layout_marginRight="2.0dip" layout="@layout/wm_network_stats" />
<com.fiqih.anaknya.mbol.Traffic android:textAppearance="@style/TextAppearance.StatusBar.Traffic" android:gravity="left|center" android:id="@id/traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:singleLine="true" />
2014年12月14日 15点12分
4
level 12
贴吧排版有问题,直接下载xml教程吧,注意代码对齐
2014年12月14日 15点12分
5
level 12
2 、 打开res/values/ids.xml
在 </resources>的上面添加如下代码:
2014年12月14日 15点12分
6
level 12
<item type="id" name="traffic">false</item>
<item type="id" name="bubble_r">false</item>
<item type="id" name="bubble_l">false</item>
2014年12月14日 15点12分
7
level 12
3 、 打开res/values/styles.xml
在 </resources>的上面添加如下代码:
2014年12月14日 15点12分
8
level 12
<style name="TextAppearance.StatusBar.NetworkStats" parent="@*android:style/TextAppearance.StatusBar">
<item name="android:textSize">10.0dip</item>
<item name="android:textColor">#ff1ac31a</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1.0</item>
</style>
<style name="TextAppearance.StatusBar.Traffic" parent="@*android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">14.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ffffffff</item>
</style>
2014年12月14日 15点12分
9
level 12
4 、 解压附件,复制res文件夹与smali文件夹覆盖到你编译的apk中覆盖。回编译
5 、 再次反编译新生成的APK,打开res/values/public.xml
2014年12月14日 15点12分
10
level 12
找到如下:
<public type="id" name="bubble_r" id="0x7......." />
<public type="id" name="bubble_l" id="0x7......." />
其中0x7......代表编译自动生成的ID 每个人都不一样,所以我就不列举出来了。
2014年12月14日 15点12分
11
level 12
6 、 打开 /smali/com/fiqih/anaknya/mbol/NetworkStatsView.smali
搜索: 0x7f0c00f7 并将此ID值替换为<public type="id" name="bubble_r" id="0x7......." />中的ID
搜索: 0x7f0c00f8 并将此ID值替换为<public type="id" name="bubble_l" id="0x7......." />中的ID
2014年12月14日 15点12分
12
level 12
修改好了保存退出,回编译。 提取修改与添加的文件替换进原UI里边替换进系统重启手机。安装网速设置.apk就能设置状态栏网速的一些相关属性了;有能力可提取设置程序拼进系统设置里边
2014年12月14日 15点12分
13