mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-06-05 21:49:26 +02:00
Space key fix
This commit is contained in:
@ -201,8 +201,14 @@ class MyKeyboard {
|
||||
|
||||
a.recycle()
|
||||
a = res.obtainAttributes(Xml.asAttributeSet(parser), R.styleable.MyKeyboard_Key)
|
||||
|
||||
label = a.getText(R.styleable.MyKeyboard_Key_keyLabel) ?: ""
|
||||
code = a.getInt(R.styleable.MyKeyboard_Key_code, 0)
|
||||
|
||||
if (label.isNotEmpty() && code == 0) {
|
||||
code = label[0].code
|
||||
}
|
||||
|
||||
popupCharacters = a.getText(R.styleable.MyKeyboard_Key_popupCharacters)
|
||||
popupResId = a.getResourceId(R.styleable.MyKeyboard_Key_popupKeyboard, 0)
|
||||
repeatable = a.getBoolean(R.styleable.MyKeyboard_Key_isRepeatable, false)
|
||||
@ -213,12 +219,9 @@ class MyKeyboard {
|
||||
secondaryIcon = a.getDrawable(R.styleable.MyKeyboard_Key_secondaryKeyIcon)
|
||||
secondaryIcon?.setBounds(0, 0, secondaryIcon!!.intrinsicWidth, secondaryIcon!!.intrinsicHeight)
|
||||
|
||||
label = a.getText(R.styleable.MyKeyboard_Key_keyLabel) ?: ""
|
||||
topSmallNumber = a.getString(R.styleable.MyKeyboard_Key_topSmallNumber) ?: ""
|
||||
|
||||
if (label.isNotEmpty() && code != KEYCODE_MODE_CHANGE && code != KEYCODE_SHIFT) {
|
||||
code = label[0].code
|
||||
}
|
||||
|
||||
a.recycle()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user