analogue watch ui

This commit is contained in:
minjaesong
2023-09-09 17:58:31 +09:00
parent c5134ffe97
commit 6c9cbcdfd1
8 changed files with 146 additions and 30 deletions

View File

@@ -83,14 +83,16 @@ fun getKeycapFkeys(n: Int) = when (n) {
fun List<Int>.toJavaString(): String {
val sb = StringBuilder()
this.subList(0, this.size).forEach {
if (it > 65535) {
val u = it - 65536
sb.append((0xD800 or (u ushr 10).and(1023)).toChar())
sb.append((0xDC00 or (u and 1023)).toChar())
}
else {
sb.append(it.toChar())
synchronized(this) {
this.forEach {
if (it > 65535) {
val u = it - 65536
sb.append((0xD800 or (u ushr 10).and(1023)).toChar())
sb.append((0xDC00 or (u and 1023)).toChar())
}
else {
sb.append(it.toChar())
}
}
}
return sb.toString()