我使用这段代码来展开状态栏:
除了三星Lollipop设备外,它运行良好,什么都没有发生。 有人知道如何在三星Lollipop设备上扩展状态栏吗? 谢谢!
Object sbservice = getSystemService( "statusbar" );
Class<?> statusbarManager = Class.forName( "android.app.StatusBarManager" );
Method showsb;
if (Build.VERSION.SDK_INT >= 17) {
showsb = statusbarManager.getMethod("expandNotificationsPanel");
}
else {
showsb = statusbarManager.getMethod("expand");
}
showsb.invoke( sbservice );
有权限的情况下:
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
除了三星Lollipop设备外,它运行良好,什么都没有发生。 有人知道如何在三星Lollipop设备上扩展状态栏吗? 谢谢!