api: colors.isSimilar, colors.equals

fix: circular menu icon is not circular when recording
feat: splash ui for built apk
docs: update to latest docs
fix: floating menu not showing automatically
This commit is contained in:
hyb1996
2018-02-02 18:30:08 +08:00
parent d1221d530e
commit c75337a767
25 changed files with 343 additions and 146 deletions

View File

@@ -50,6 +50,28 @@ public class Colors {
}
public String toString(int color) {
return "#" + Integer.toHexString(color);
StringBuilder c = new StringBuilder(Integer.toHexString(color));
while (c.length() < 6) {
c.insert(0, "0");
}
return "#" + c;
}
public boolean equals(int c1, int c2) {
return (c1 & 0xffffff) == (c2 & 0xffffff);
}
public boolean equals(int c1, String c2) {
return equals(c1, parseColor(c2));
}
public boolean equals(String c1, int c2) {
return equals(parseColor(c1), c2);
}
public boolean equals(String c1, String c2) {
return equals(parseColor(c1), parseColor(c2));
}
}