mirror of https://github.com/M66B/FairEmail.git
Fixed color button title color
This commit is contained in:
parent
d4e3134c67
commit
32fd65fbb7
|
@ -70,8 +70,12 @@ public class ViewButtonColor extends AppCompatButton {
|
|||
Helper.resolveColor(getContext(), R.attr.colorSeparator));
|
||||
setBackground(background);
|
||||
|
||||
double lum = ColorUtils.calculateLuminance(color);
|
||||
setTextColor(lum < 0.5 ? Color.WHITE : Color.BLACK);
|
||||
if (color == Color.TRANSPARENT)
|
||||
setTextColor(Helper.resolveColor(getContext(), android.R.attr.textColorPrimary));
|
||||
else {
|
||||
double lum = ColorUtils.calculateLuminance(color);
|
||||
setTextColor(lum < 0.5 ? Color.WHITE : Color.BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
int getColor() {
|
||||
|
|
Loading…
Reference in New Issue