Open limengxin opened 4 years ago
现在我没设置fitsSystemWindows,解决方法暂时是 手动设置一个contentView.setPadding(0, statusBarHeight, 0, 0)
`
@TargetApi(Build.VERSION_CODES.M) public static void setLightMode(Activity activity) { setMIUIStatusBarDarkIcon(activity, true); setMeizuStatusBarDarkIcon(activity, true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); } }
@TargetApi(Build.VERSION_CODES.M)
public static void setDarkMode(Activity activity) {
setMIUIStatusBarDarkIcon(activity, false);
setMeizuStatusBarDarkIcon(activity, false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
}
}
`
如题