Color workarounds

This commit is contained in:
M66B 2020-01-21 16:36:55 +01:00
parent 8932cdcc86
commit ec2ffcb3d9
1 changed files with 2 additions and 1 deletions

View File

@ -181,6 +181,7 @@ public class HtmlHelper {
case "color": case "color":
String c = value String c = value
.replace("none", "") .replace("none", "")
.replace("unset", "")
.replace("inherit", "") .replace("inherit", "")
.replace("initial", "") .replace("initial", "")
.replace("windowtext", "") .replace("windowtext", "")
@ -211,7 +212,7 @@ public class HtmlHelper {
try { try {
color = Color.parseColor(c); color = Color.parseColor(c);
} catch (IllegalArgumentException ex) { } catch (IllegalArgumentException ex) {
color = Color.parseColor("#" + c); color = Integer.decode(c) | 0xFF000000;
} }
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e("Color=" + c); Log.e("Color=" + c);