怎么样将手机时间的状态栏精确到秒
安卓手机功能强大,而其中状态栏的设计作为发烧友的你又怎能错过。将状态栏的时间精确到每秒钟,不仅进一步方便管理时间,更显示出你的手机与众不同。
操作方法
- 01
1.首先我们需要找到手机中一个名为SystemUI.apkreslayouttw_status_bar.xml的文件,你可以用任何第三方工具将它打开,只要能够进行编译,这里建议使用Notepda。
- 02
2.有一段代码是: android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff959595" android:ellipsize="none" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" /> 这里就是状态栏时间的代码,实在看不清楚的,可以在本经验种ctrl+c,找到后把它删除。
- 03
3.接着往下找到一段代码: android:paddingLeft="4.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
- 04
4.在第三步的代码后面(打换行)加上: android:layout_width="wrap_content" android:layout_height="fill_parent"> android:textColor="#ff959595" android:gravity="center" android:id="@+id/digitalClock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
- 05
5.完成之后记得保存,将reslayouttw_status_bar.xml,和resources.arsc文件复制到原SystemUI.apk替换一下。
- 06
6.保存后修改手机权限,重启即可。