首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

StatusBarManager的施用

2012-07-20 
StatusBarManager的使用StatusBarManager的使用?public static final int DISABLE_EXPAND View.STATUS_B

StatusBarManager的使用

StatusBarManager的使用

?

public static final int DISABLE_EXPAND = View.STATUS_BAR_DISABLE_EXPAND;
??? public static final int DISABLE_NOTIFICATION_ICONS = View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS;
??? public static final int DISABLE_NOTIFICATION_ALERTS
??????????? = View.STATUS_BAR_DISABLE_NOTIFICATION_ALERTS;
??? public static final int DISABLE_NOTIFICATION_TICKER
??????????? = View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER;
??? public static final int DISABLE_SYSTEM_INFO = View.STATUS_BAR_DISABLE_SYSTEM_INFO;
??? public static final int DISABLE_NAVIGATION = View.STATUS_BAR_DISABLE_NAVIGATION;
??? public static final int DISABLE_BACK = View.STATUS_BAR_DISABLE_BACK;
??? public static final int DISABLE_CLOCK = View.STATUS_BAR_DISABLE_CLOCK;

??? public static final int DISABLE_NONE = 0x00000000;

??? public static final int DISABLE_MASK = DISABLE_EXPAND | DISABLE_NOTIFICATION_ICONS
??????????? | DISABLE_NOTIFICATION_ALERTS | DISABLE_NOTIFICATION_TICKER
??????????? | DISABLE_SYSTEM_INFO| DISABLE_NAVIGATION | DISABLE_BACK | DISABLE_CLOCK;

?

?

?//使用:

??public static final? int backMask = StatusBarManager.DISABLE_EXPAND | StatusBarManager.DISABLE_NOTIFICATION_ICONS
??????????? | StatusBarManager.DISABLE_NOTIFICATION_ALERTS | StatusBarManager.DISABLE_NOTIFICATION_TICKER
??????????? | StatusBarManager.DISABLE_SYSTEM_INFO| StatusBarManager.DISABLE_NAVIGATION | StatusBarManager.DISABLE_CLOCK;

?

StatusBarManager mStatusBarManager = (StatusBarManager)getSystemService("statusbar");

mStatusBarManager.disable(backMask );//只留下back

mStatusBarManager.disable(DISABLE_NONE );? //还原状态

热点排行