|
|
@ -126,11 +126,9 @@ object ATH { |
|
|
|
activity: Activity, |
|
|
|
activity: Activity, |
|
|
|
color: Int = ThemeStore.navigationBarColor(activity) |
|
|
|
color: Int = ThemeStore.navigationBarColor(activity) |
|
|
|
) { |
|
|
|
) { |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { |
|
|
|
|
|
|
|
activity.window.navigationBarColor = color |
|
|
|
activity.window.navigationBarColor = color |
|
|
|
setLightNavigationBar(activity, ColorUtils.isColorLight(color)) |
|
|
|
setLightNavigationBar(activity, ColorUtils.isColorLight(color)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun setLightNavigationBar(activity: Activity, enabled: Boolean) { |
|
|
|
fun setLightNavigationBar(activity: Activity, enabled: Boolean) { |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { |
|
|
@ -170,9 +168,7 @@ object ATH { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun setTaskDescriptionColor(activity: Activity, @ColorInt color: Int) { |
|
|
|
fun setTaskDescriptionColor(activity: Activity, @ColorInt color: Int) { |
|
|
|
val color1: Int |
|
|
|
val color1: Int = ColorUtils.stripAlpha(color) |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { |
|
|
|
|
|
|
|
color1 = ColorUtils.stripAlpha(color) |
|
|
|
|
|
|
|
@Suppress("DEPRECATION") |
|
|
|
@Suppress("DEPRECATION") |
|
|
|
activity.setTaskDescription( |
|
|
|
activity.setTaskDescription( |
|
|
|
ActivityManager.TaskDescription( |
|
|
|
ActivityManager.TaskDescription( |
|
|
@ -182,7 +178,6 @@ object ATH { |
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun setTint( |
|
|
|
fun setTint( |
|
|
|
view: View, |
|
|
|
view: View, |
|
|
|