类 StatusBarCompat


  • public class StatusBarCompat
    extends java.lang.Object
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static void compat​(android.app.Activity activity)  
      static void compat​(android.app.Activity activity, int statusColor)  
      static int getStatusBarHeight​(android.content.Context context)  
      static void setFitSystemForTheme​(android.app.Activity activity, boolean fitSystemForTheme, int color)  
      static void setFitSystemForTheme​(android.app.Activity activity, boolean fitSystemForTheme, java.lang.String color)
      Can set the status bar's status and change the color of status background
      static void setLightStatusBar​(android.app.Activity activity, boolean dark)  
      static boolean setMIUISetStatusBarLightMode​(android.app.Activity activity, boolean dark)  
      static void setToolbarCustomColor​(android.content.Context context, int colorId)
      Set custom color for toolbar arrow
      static void setToolbarCustomColor​(android.content.Context context, int colorId, android.graphics.drawable.Drawable leftArrow)
      Set custom color for toolbar arrow
      static void setToolbarCustomColorDefault​(android.content.Context context, int colorId)
      Set custom color for toolbar arrow
      static void setToolbarCustomColorDefault​(android.content.Context context, int colorId, android.graphics.drawable.Drawable leftArrow)
      Set custom color for toolbar arrow
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • StatusBarCompat

        public StatusBarCompat()
    • 方法详细资料

      • setFitSystemForTheme

        public static void setFitSystemForTheme​(android.app.Activity activity,
                                                boolean fitSystemForTheme,
                                                java.lang.String color)
        Can set the status bar's status and change the color of status background
        参数:
        activity -
        fitSystemForTheme - If is FALSE, you can see the status bar; Or not see.
        color - status color
      • setFitSystemForTheme

        public static void setFitSystemForTheme​(android.app.Activity activity,
                                                boolean fitSystemForTheme,
                                                int color)
      • compat

        public static void compat​(android.app.Activity activity,
                                  int statusColor)
      • compat

        public static void compat​(android.app.Activity activity)
      • getStatusBarHeight

        public static int getStatusBarHeight​(android.content.Context context)
      • setLightStatusBar

        public static void setLightStatusBar​(android.app.Activity activity,
                                             boolean dark)
      • setMIUISetStatusBarLightMode

        public static boolean setMIUISetStatusBarLightMode​(android.app.Activity activity,
                                                           boolean dark)
      • setToolbarCustomColor

        public static void setToolbarCustomColor​(android.content.Context context,
                                                 @ColorRes
                                                 int colorId)
        Set custom color for toolbar arrow
        参数:
        context -
        colorId -
      • setToolbarCustomColor

        public static void setToolbarCustomColor​(android.content.Context context,
                                                 @ColorRes
                                                 int colorId,
                                                 android.graphics.drawable.Drawable leftArrow)
        Set custom color for toolbar arrow
        参数:
        context -
        colorId -
        leftArrow -
      • setToolbarCustomColorDefault

        public static void setToolbarCustomColorDefault​(android.content.Context context,
                                                        @ColorInt
                                                        int colorId)
        Set custom color for toolbar arrow
        参数:
        context -
        colorId -
      • setToolbarCustomColorDefault

        public static void setToolbarCustomColorDefault​(android.content.Context context,
                                                        @ColorInt
                                                        int colorId,
                                                        android.graphics.drawable.Drawable leftArrow)
        Set custom color for toolbar arrow
        参数:
        context -
        colorId -
        leftArrow -