[Guide]How to Add Volume Slider
Tutorial:
1.Download The File In Attachment
2.反编译 SystemUI.apk
3.解压附件至相应位置
4.打开 res\layout\statusbar_expanded.xml
5.添加此段代码到 Statusbar_expanded
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="44.0dip" android:baselineAligned="false">
<include layout="@layout/slider_controls" />
</RelativeLayout>
6.保存并回编译
-再一次反编译 SystemUI.apk
7.打开 Res\Values\public.xml
找到这些代码,并记住它!
***
**** <public type="drawable" name="ic_volume_media" id="0x7f020XXX" />
**** <public type="drawable" name="ic_volume_notif" id="0x7f020XXX" />
**** <public type="drawable" name="ic_volume_ringer" id="0x7f020XXX" />
**** <public type="drawable" name="ic_volume_system" id="0x7f020XXX" />
下一步需要重新定义smali里的id,将原来smali里的id,替换成你的id!
8. 打开 smali/com/b16h22/MediaVolumeSlider.smali
*** 找到 0x7f0200b6 —— ic_volume_media replace with hex code themselves (0x7f020XXX)
9. 打开 smali/com/b16h22/NotificationVolumeSlider.smali
*** 找到 0x7f0200b7 —— ic_volume_notif (0x7f020XXX)
10. 打开 smali/com/b16h22/RingerVolumeSlider.smali
*** 找到 0x7f0200b8 —— ic_volume_ringer (0x7f020XXX)
11. 打开 smali/com/b16h22/SystemVolumeSlider.smali
*** 找到 0x7f0200b9 —— ic_volume_system (0x7f020XXX)
——表示将前面的 0x7f020xxx 替换成后面代码的public.xml里的id
12. 保存并回编译
应该可以看到吧。。
Tutorial:
1.Download The File In Attachment
2.反编译 SystemUI.apk
3.解压附件至相应位置
4.打开 res\layout\statusbar_expanded.xml
5.添加此段代码到 Statusbar_expanded
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="44.0dip" android:baselineAligned="false">
<include layout="@layout/slider_controls" />
</RelativeLayout>
6.保存并回编译
-再一次反编译 SystemUI.apk
7.打开 Res\Values\public.xml
找到这些代码,并记住它!
***
**** <public type="drawable" name="ic_volume_media" id="0x7f020XXX" />
**** <public type="drawable" name="ic_volume_notif" id="0x7f020XXX" />
**** <public type="drawable" name="ic_volume_ringer" id="0x7f020XXX" />
**** <public type="drawable" name="ic_volume_system" id="0x7f020XXX" />
下一步需要重新定义smali里的id,将原来smali里的id,替换成你的id!
8. 打开 smali/com/b16h22/MediaVolumeSlider.smali
*** 找到 0x7f0200b6 —— ic_volume_media replace with hex code themselves (0x7f020XXX)
9. 打开 smali/com/b16h22/NotificationVolumeSlider.smali
*** 找到 0x7f0200b7 —— ic_volume_notif (0x7f020XXX)
10. 打开 smali/com/b16h22/RingerVolumeSlider.smali
*** 找到 0x7f0200b8 —— ic_volume_ringer (0x7f020XXX)
11. 打开 smali/com/b16h22/SystemVolumeSlider.smali
*** 找到 0x7f0200b9 —— ic_volume_system (0x7f020XXX)
——表示将前面的 0x7f020xxx 替换成后面代码的public.xml里的id
12. 保存并回编译
应该可以看到吧。。