mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
Theme
This commit is contained in:
parent
97f549dc93
commit
c16319a4bf
@ -99,7 +99,7 @@ public final class ATH {
|
||||
TintHelper.setTintAuto(view, color, true);
|
||||
}
|
||||
|
||||
public static void setAlertDialogTint(@NonNull AlertDialog dialog) {
|
||||
public static AlertDialog setAlertDialogTint(@NonNull AlertDialog dialog) {
|
||||
ColorStateList colorStateList = Selector.colorBuild()
|
||||
.setDefaultColor(ThemeStore.accentColor(dialog.getContext()))
|
||||
.setPressedColor(ColorUtil.darkenColor(ThemeStore.accentColor(dialog.getContext())))
|
||||
@ -110,6 +110,7 @@ public final class ATH {
|
||||
if (dialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_POSITIVE) != null) {
|
||||
dialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_POSITIVE).setTextColor(colorStateList);
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
|
||||
private ATH() {
|
||||
|
@ -0,0 +1,7 @@
|
||||
package io.legado.app.utils
|
||||
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import io.legado.app.lib.theme.ATH
|
||||
|
||||
val AlertDialog.upTint: AlertDialog
|
||||
get() = ATH.setAlertDialogTint(this)
|
Loading…
Reference in New Issue
Block a user