public class StatusBarUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_FLYME |
static int |
TYPE_M |
static int |
TYPE_MIUI |
Constructor and Description |
---|
StatusBarUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
getStatusBarHeight(android.content.Context context) |
static boolean |
setCommonUI(android.app.Activity activity,
boolean dark) |
static boolean |
setFlymeUI(android.app.Activity activity,
boolean dark) |
static boolean |
setMiuiUI(android.app.Activity activity,
boolean dark) |
static void |
setRootViewFitsSystemWindows(android.app.Activity activity,
boolean fitSystemWindows)
代码实现android:fitsSystemWindows
|
static void |
setStatusBarColor(android.app.Activity activity,
int colorId)
修改状态栏颜色,支持4.4以上版本
|
static boolean |
setStatusBarDarkTheme(android.app.Activity activity,
boolean dark)
设置状态栏深色浅色切换
|
static boolean |
setStatusBarFontIconDark(android.app.Activity activity,
int type,
boolean dark)
设置 状态栏深色浅色切换
|
static void |
setTranslucentStatus(android.app.Activity activity)
设置状态栏透明
|
public static final int TYPE_MIUI
public static final int TYPE_FLYME
public static final int TYPE_M
public static void setStatusBarColor(android.app.Activity activity, int colorId)
colorId
- 颜色public static void setTranslucentStatus(android.app.Activity activity)
public static void setRootViewFitsSystemWindows(android.app.Activity activity, boolean fitSystemWindows)
activity
- public static boolean setStatusBarDarkTheme(android.app.Activity activity, boolean dark)
public static boolean setStatusBarFontIconDark(android.app.Activity activity, int type, boolean dark)
public static boolean setCommonUI(android.app.Activity activity, boolean dark)
public static boolean setFlymeUI(android.app.Activity activity, boolean dark)
public static boolean setMiuiUI(android.app.Activity activity, boolean dark)
public static int getStatusBarHeight(android.content.Context context)