Package 

Class StatusBarHelper

    • Method Detail

      • translucent

         static void translucent(Activity activity, @ColorInt() int colorOn5x)

        沉浸式状态栏。支持 4.4 以上版本的 MIUI 和 Flyme,以及 5.0 以上版本的其他 Android。

        Parameters:
        activity - 需要被设置沉浸式状态栏的 Activity。
      • retainSystemUiFlag

         static int retainSystemUiFlag(Window window, int out, int type)

        如果原本存在某一个flag, 就将它迁移到 out

      • setStatusBarLightMode

         static boolean setStatusBarLightMode(Activity activity)

        设置状态栏黑色字体图标,支持 4.4 以上版本 MIUI 和 Flyme,以及 6.0 以上版本的其他 Android

        Parameters:
        activity - 需要被处理的 Activity
      • setStatusBarDarkMode

         static boolean setStatusBarDarkMode(Activity activity)

        设置状态栏白色字体图标支持 4.4 以上版本 MIUI 和 Flyme,以及 6.0 以上版本的其他 Android

      • MIUISetStatusBarLightMode

         static boolean MIUISetStatusBarLightMode(Window window, boolean light)

        设置状态栏字体图标为深色,需要 MIUIV6 以上

        Parameters:
        window - 需要设置的窗口
        light - 是否把状态栏字体及图标颜色设置为深色
      • FlymeSetStatusBarLightMode

         static boolean FlymeSetStatusBarLightMode(Window window, boolean light)

        设置状态栏图标为深色和魅族特定的文字风格可以用来判断是否为 Flyme 用户

        Parameters:
        window - 需要设置的窗口
        light - 是否把状态栏字体及图标颜色设置为深色
      • getStatusBarAPITransparentValue

         static Integer getStatusBarAPITransparentValue(Context context)

        API19之前透明状态栏:获取设置透明状态栏的system ui visibility的值,这是部分有提供接口的rom使用的http://stackoverflow.com/questions/21865621/transparent-status-bar-before-4-4-kitkat