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 );? //还原状态