public static void collapseStatusBar(Context context) { try { Object statusBarManager = context.getSystemService("statusbar"); Method collapse; if (Build.VERSION.SDK_INT <= 16) { collapse = statusBarManager.getClass().getMethod("collapse"); } else { collapse = statusBarManager.getClass().getMethod("collapsePanels"); } collapse.invoke(statusBarManager); } catch (Exception localException) { localException.printStackTrace(); } }
android 收起通知栏和下拉托盘
最新推荐文章于 2022-08-27 10:30:00 发布