Android 打开状态栏 EXPAND_STATUS_BAR
2013-08-14 16:00
363 查看
try{ Object service = context.getSystemService("statusbar"); Class<?> statusBarManager = Class.forName("android.app.StatusBarManager"); Method expand = statusBarManager.getMethod("expand"); expand.invoke(service); Log.d("click", "-------------2"); }catch(NoSuchMethodException e) { try{ Object obj = context.getSystemService("statusbar"); Class.forName("android.app.StatusBarManager") .getMethod("expandNotificationsPanel", new Class[0]) .invoke(obj, (Object[]) null); Log.d("click", "-------------3"); }catch(Exception e2){ } }catch(Exception e){ }
相关文章推荐
- 【Android基础学习】Android使用fitsSystemWindows属性实现–状态栏【status_bar】各版本适配方案
- Android使用fitsSystemWindows属性实现–状态栏【status_bar】各版本适配方案
- android状态栏【status_bar】各版本适配方案
- Android使用fitsSystemWindows属性实现–状态栏【status_bar】各版本适配方案
- Android使用fitsSystemWindows属性实现--状态栏【status_bar】各版本适配方案
- Android使用fitsSystemWindows属性实现状态栏【status_bar】的适配方案
- Android使用fitsSystemWindows属性实现--状态栏【status_bar】各版本适配方案
- Android使用fitsSystemWindows属性实现–状态栏【status_bar】各版本适配方案
- Android使用fitsSystemWindows属性实现–状态栏【status_bar】各版本适配方案
- Android使用fitsSystemWindows属性实现--状态栏【status_bar】各版本适配方案
- 【Android基础学习】Android使用fitsSystemWindows属性实现–状态栏【status_bar】各版本适配方案
- Android使用fitsSystemWindows属性实现–状态栏【status_bar】各版本适配方案
- Android使用fitsSystemWindows属性实现--状态栏【status_bar】各版本适配方案
- Android使用fitsSystemWindows属性实现–状态栏【status_bar】各版本适配方案
- Java基础之扩展GUI——添加状态栏(Sketcher 1 with a status bar)
- android 首次开机会发现状态栏的数据链接图标会自动打开然后又消失
- 如何在代码里打开Android手机通知状态栏
- (转)3.3设置状态栏(Setting Up the Status Bar)
- Android沉浸式(侵入式)标题栏(状态栏)Status(三)