|
|
|
@ -38,14 +38,10 @@ public final class WindowUtil {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void setNavigationBarColor(@NonNull Window window, @ColorInt int color) {
|
|
|
|
|
if (Build.VERSION.SDK_INT < 21) return;
|
|
|
|
|
|
|
|
|
|
window.setNavigationBarColor(color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void setLightStatusBarFromTheme(@NonNull Activity activity) {
|
|
|
|
|
if (Build.VERSION.SDK_INT < 23) return;
|
|
|
|
|
|
|
|
|
|
final boolean isLightStatusBar = ThemeUtil.getThemedBoolean(activity, android.R.attr.windowLightStatusBar);
|
|
|
|
|
|
|
|
|
|
if (isLightStatusBar) setLightStatusBar(activity.getWindow());
|
|
|
|
@ -53,20 +49,14 @@ public final class WindowUtil {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void clearLightStatusBar(@NonNull Window window) {
|
|
|
|
|
if (Build.VERSION.SDK_INT < 23) return;
|
|
|
|
|
|
|
|
|
|
clearSystemUiFlags(window, View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void setLightStatusBar(@NonNull Window window) {
|
|
|
|
|
if (Build.VERSION.SDK_INT < 23) return;
|
|
|
|
|
|
|
|
|
|
setSystemUiFlags(window, View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void setStatusBarColor(@NonNull Window window, @ColorInt int color) {
|
|
|
|
|
if (Build.VERSION.SDK_INT < 21) return;
|
|
|
|
|
|
|
|
|
|
window.setStatusBarColor(color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|