mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-18 21:28:54 +00:00
Added color workarounds
This commit is contained in:
parent
1b0e8d70a9
commit
f9762dd014
1 changed files with 6 additions and 1 deletions
|
@ -180,6 +180,7 @@ public class HtmlHelper {
|
|||
switch (key) {
|
||||
case "color":
|
||||
String c = value
|
||||
.replace("none", "")
|
||||
.replace("inherit", "")
|
||||
.replace("initial", "")
|
||||
.replace("windowtext", "")
|
||||
|
@ -207,7 +208,11 @@ public class HtmlHelper {
|
|||
} else if (c.equals("orange"))
|
||||
color = 0Xffa500; // CSS Level 2
|
||||
else
|
||||
color = Color.parseColor(c);
|
||||
try {
|
||||
color = Color.parseColor(c);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
color = Color.parseColor("#" + c);
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
Log.e("Color=" + c);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue