禁止android显示状态栏
16lz
2022-01-16
不让整个系统显示状态栏(信号格、运营商、时间、蓝牙、电量、wifi等),打开下面路径下文件。注释注释掉代码。
alps\frameworks\base\packages\SystemUI\src\com\android\systemui\ SystemUIService.java
public void onCreate() {
//注掉以下代码
/* boot Systemui Service HashMap components = new HashMap();
final int N = SERVICES.length;
for (int i=0; i cl = SERVICES[i];
Log.d(TAG, "loading: " + cl); try { mServices[i] = (SystemUI)cl.newInstance();
} catch (IllegalAccessException ex) {
throw new RuntimeException(ex);
} catch (InstantiationException ex) {
throw new RuntimeException(ex);
} mServices[i].mContext = this; mServices[i].mComponents = components;
Log.d(TAG, "running: " + mServices[i]); mServices[i].start(); } */
}
alps\frameworks\base\packages\SystemUI\src\com\android\systemui\ SystemUIService.java
public void onCreate() {
//注掉以下代码
/* boot Systemui Service HashMap
final int N = SERVICES.length;
for (int i=0; i cl = SERVICES[i];
Log.d(TAG, "loading: " + cl); try { mServices[i] = (SystemUI)cl.newInstance();
} catch (IllegalAccessException ex) {
throw new RuntimeException(ex);
} catch (InstantiationException ex) {
throw new RuntimeException(ex);
} mServices[i].mContext = this; mServices[i].mComponents = components;
Log.d(TAG, "running: " + mServices[i]); mServices[i].start(); } */
}
更多相关文章
- Android开发人员不得不收集的代码(持续更新中)
- Android使用Application总结
- 如何获取Android唯一标识(唯一序列号)
- Android清除本地数据缓存代码
- Android使用ListView使用
- Android(安卓)TabHost使用、动态加载内容
- 利用Handler来更新android的UI
- 移植 libusb 到 Beagleboard 上的 Android
- ReactNative调用原生封装的代码和控件