pull/32/head
GKF 6 years ago
parent 97f549dc93
commit c16319a4bf
  1. 3
      app/src/main/java/io/legado/app/lib/theme/ATH.java
  2. 7
      app/src/main/java/io/legado/app/utils/AlertDialogExtensions.kt

@ -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…
Cancel
Save