|
@@ -40,6 +40,7 @@ import android.widget.ProgressBar;
|
|
|
import android.widget.SeekBar;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
+import com.google.android.material.button.MaterialButton;
|
|
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
|
|
import com.google.android.material.snackbar.Snackbar;
|
|
|
import com.google.android.material.textfield.TextInputLayout;
|
|
@@ -419,6 +420,24 @@ public final class ThemeUtils {
|
|
|
));
|
|
|
}
|
|
|
|
|
|
+ public static void themeDialogActionButton(MaterialButton button) {
|
|
|
+ if (button == null ) return;
|
|
|
+
|
|
|
+ Context context = button.getContext();
|
|
|
+ int accentColor = ThemeUtils.primaryAccentColor(button.getContext());
|
|
|
+ int disabledColor = ContextCompat.getColor(context, R.color.disabled_text);
|
|
|
+ button.setTextColor(new ColorStateList(
|
|
|
+ new int[][]{
|
|
|
+ new int[] { android.R.attr.state_enabled}, // enabled
|
|
|
+ new int[] {-android.R.attr.state_enabled}, // disabled
|
|
|
+ },
|
|
|
+ new int[]{
|
|
|
+ accentColor,
|
|
|
+ disabledColor
|
|
|
+ }
|
|
|
+ ));
|
|
|
+ }
|
|
|
+
|
|
|
public static void themeEditText(Context context, EditText editText, boolean themedBackground) {
|
|
|
if (editText == null) { return; }
|
|
|
|