设为首页 加入收藏

TOP

Android4.0隐藏状态栏电池图标
2014-11-24 11:47:43 来源: 作者: 【 】 浏览:0
Tags:Android4.0 隐藏 状态 电池 图标

android4.0/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
import com.android.systemui.R;
public class BatteryController extends BroadcastReceiver {
private static final String TAG = "StatusBar.BatteryController";
private Context mContext;
private ArrayList mIconViews = new ArrayList();
private ArrayList mLabelViews = new ArrayList();
public BatteryController(Context context) {
mContext = context;
IntentFilter filter = new IntentFilter();
/* delete by Gary. start {{----------------------------------- */
/* 2012-4-5 */
/* hide the battery icon in the statusbar */
// filter.addAction(Intent.ACTION_BATTERY_CHANGED);
/* delete by Gary. end -----------------------------------}} */
context.registerReceiver(this, filter);
}
public void addIconView(ImageView v) {
/* add by Gary. start {{----------------------------------- */
/* 2012-4-5 */
/* hide the battery icon in the statusbar */
v.setVisibility(View.GONE);
/* add by Gary. end -----------------------------------}} */
mIconViews.add(v);
}
public void addLabelView(TextView v) {
/* add by Gary. start {{----------------------------------- */
/* 2012-4-5 */
/* hide the battery icon in the statusbar */
v.setVisibility(View.GONE);
/* add by Gary. end -----------------------------------}} */
mLabelViews.add(v);
}


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Linux sysfs实现hdmi开关 下一篇Android4.0强制横屏竖屏

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·请问c语言刚入门,该 (2025-12-26 10:21:04)
·python 编程怎么定义 (2025-12-26 10:21:01)
·09-指 针 (一)-c语言 (2025-12-26 10:20:58)
·About - Redis (2025-12-26 08:20:56)
·Redis: A Comprehens (2025-12-26 08:20:53)