Merge latest main into own

This commit is contained in:
Jacob Kapitein
2022-08-03 20:28:44 +02:00
75 changed files with 4293 additions and 106 deletions

View File

@ -65,6 +65,7 @@ class MyKeyboard {
const val KEYCODE_ENTER = -4
const val KEYCODE_DELETE = -5
const val KEYCODE_SPACE = 32
const val KEYCODE_EMOJI = -6
fun getDimensionOrFraction(a: TypedArray, index: Int, base: Int, defValue: Int): Int {
val value = a.peekValue(index) ?: return defValue
@ -207,7 +208,7 @@ class MyKeyboard {
topSmallNumber = a.getString(R.styleable.MyKeyboard_Key_topSmallNumber) ?: ""
if (label.isNotEmpty() && code != KEYCODE_MODE_CHANGE && code != KEYCODE_SHIFT) {
code = label[0].toInt()
code = label[0].code
}
a.recycle()
}
@ -287,7 +288,7 @@ class MyKeyboard {
key.x = x
key.y = y
key.label = character.toString()
key.code = character.toInt()
key.code = character.code
column++
x += key.width + key.gap
mKeys!!.add(key)