一种不添加图片
一种添加图片
反编译回编教程这里就不说了,可以找找相关帖子。
第一种不添加图片
反编译SystemUI.apk, 打开res/layout/status_bar.xml找到这句代码
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#ffffffff" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />也就是时间的代码,然后在这句时间代码的下面添加一句
<com.android.systemui.statusbar.policy.KeyButtonView
android:layout_gravity="right" androidrientation="vertical"
android:id="@id/back" android:paddingRight="42.0dip" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:src="#00000000"
android:layout_toRightOf="@id/recent_apps"
android:contentDescription="@string/accessibility_back"
systemui:keyCode="26"
systemui:glowBackground="@drawable/ic_sysbar_highlight"/>就是锁屏代码
下面简单介绍一下意思
android:layout_gravity="right"
这个是说放的按键位置为右边,如果是="left", 就是放在左边
android:paddingRight="42.0dip"
这个是说,距离右边屏幕边沿的偏移量:42dip在820的分辨率上对应的是84像素,如果是分辨率低的手机相应的减少这个数字即可
android:src="#00000000"
这个是说按键的颜色,这里设置为透明
systemui:keyCode="26"
这个代表添加的按键的映射代码,26其实是电源键,如果为187,则为最近任务键
systemui:glowBackground="@drawable/ic_sysbar_highlight"/>
这个是说按键时的背景,也可以按照上面修改颜色
然后回编译,将res文件夹和 resources.arsc 替换到原来的apk文件里即可
第二种添加图片
反编辑systemUI.apk
打开res\layout的status_bar.xml找到
<LinearLayout androidrientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">在这句的上面添加一句
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="right" androidrientation="vertical" android:id="@id/home" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lockd" android:layout_toRightOf="@id/recent_apps" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
然后在drawable-hdpi文件夹里加入ic_sysbar_lock.png和ic_sysbar_lockd.png图片文件
(为何要加图片,是因为锁屏做了图片归属,如果你不加进去会出现回编辑不成功现象,ic_sysbar_lockd.png可以做透明的图片,就不会显示时间和锁屏重合在一起了,如果时间是剧中的,就不需要做透明图片了)
然后回编译,将res文件夹和 resources.arsc 替换到原来的apk然后替换到system/app注意权限
——————欢迎光临冰魂天寂吧,各种教程超乎你想象,喜欢搞机的欢迎加入! http://tieba.baidu.com/f?kw=%B1%F9%BB%EA%CC%EC%%C5&fr=ala0&pn=0&
一种添加图片
反编译回编教程这里就不说了,可以找找相关帖子。
第一种不添加图片
反编译SystemUI.apk, 打开res/layout/status_bar.xml找到这句代码
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#ffffffff" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />也就是时间的代码,然后在这句时间代码的下面添加一句
<com.android.systemui.statusbar.policy.KeyButtonView
android:layout_gravity="right" androidrientation="vertical"
android:id="@id/back" android:paddingRight="42.0dip" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:src="#00000000"
android:layout_toRightOf="@id/recent_apps"
android:contentDescription="@string/accessibility_back"
systemui:keyCode="26"
systemui:glowBackground="@drawable/ic_sysbar_highlight"/>就是锁屏代码
下面简单介绍一下意思
android:layout_gravity="right"
这个是说放的按键位置为右边,如果是="left", 就是放在左边
android:paddingRight="42.0dip"
这个是说,距离右边屏幕边沿的偏移量:42dip在820的分辨率上对应的是84像素,如果是分辨率低的手机相应的减少这个数字即可
android:src="#00000000"
这个是说按键的颜色,这里设置为透明
systemui:keyCode="26"
这个代表添加的按键的映射代码,26其实是电源键,如果为187,则为最近任务键
systemui:glowBackground="@drawable/ic_sysbar_highlight"/>
这个是说按键时的背景,也可以按照上面修改颜色
然后回编译,将res文件夹和 resources.arsc 替换到原来的apk文件里即可
第二种添加图片
反编辑systemUI.apk
打开res\layout的status_bar.xml找到
<LinearLayout androidrientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">在这句的上面添加一句
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="right" androidrientation="vertical" android:id="@id/home" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lockd" android:layout_toRightOf="@id/recent_apps" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
然后在drawable-hdpi文件夹里加入ic_sysbar_lock.png和ic_sysbar_lockd.png图片文件
(为何要加图片,是因为锁屏做了图片归属,如果你不加进去会出现回编辑不成功现象,ic_sysbar_lockd.png可以做透明的图片,就不会显示时间和锁屏重合在一起了,如果时间是剧中的,就不需要做透明图片了)
然后回编译,将res文件夹和 resources.arsc 替换到原来的apk然后替换到system/app注意权限
——————欢迎光临冰魂天寂吧,各种教程超乎你想象,喜欢搞机的欢迎加入! http://tieba.baidu.com/f?kw=%B1%F9%BB%EA%CC%EC%%C5&fr=ala0&pn=0&