Removed spaces
This commit is contained in:
parent
21a22092fb
commit
33c278d686
|
@ -107,6 +107,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
||||||
inputConnection.commitText("", 1)
|
inputConnection.commitText("", 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MyKeyboard.KEYCODE_SHIFT -> {
|
MyKeyboard.KEYCODE_SHIFT -> {
|
||||||
if (keyboardMode == KEYBOARD_LETTERS) {
|
if (keyboardMode == KEYBOARD_LETTERS) {
|
||||||
when {
|
when {
|
||||||
|
@ -130,6 +131,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
||||||
}
|
}
|
||||||
keyboardView!!.invalidateAllKeys()
|
keyboardView!!.invalidateAllKeys()
|
||||||
}
|
}
|
||||||
|
|
||||||
MyKeyboard.KEYCODE_ENTER -> {
|
MyKeyboard.KEYCODE_ENTER -> {
|
||||||
val imeOptionsActionId = getImeOptionsActionId()
|
val imeOptionsActionId = getImeOptionsActionId()
|
||||||
if (imeOptionsActionId != IME_ACTION_NONE) {
|
if (imeOptionsActionId != IME_ACTION_NONE) {
|
||||||
|
@ -139,6 +141,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
||||||
inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_ENTER))
|
inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_ENTER))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MyKeyboard.KEYCODE_MODE_CHANGE -> {
|
MyKeyboard.KEYCODE_MODE_CHANGE -> {
|
||||||
val keyboardXml = if (keyboardMode == KEYBOARD_LETTERS) {
|
val keyboardXml = if (keyboardMode == KEYBOARD_LETTERS) {
|
||||||
keyboardMode = KEYBOARD_SYMBOLS
|
keyboardMode = KEYBOARD_SYMBOLS
|
||||||
|
@ -150,9 +153,11 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
||||||
keyboard = MyKeyboard(this, keyboardXml, enterKeyType)
|
keyboard = MyKeyboard(this, keyboardXml, enterKeyType)
|
||||||
keyboardView!!.setKeyboard(keyboard!!)
|
keyboardView!!.setKeyboard(keyboard!!)
|
||||||
}
|
}
|
||||||
|
|
||||||
MyKeyboard.KEYCODE_EMOJI -> {
|
MyKeyboard.KEYCODE_EMOJI -> {
|
||||||
keyboardView?.openEmojiPalette()
|
keyboardView?.openEmojiPalette()
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
var codeChar = code.toChar()
|
var codeChar = code.toChar()
|
||||||
val originalText = inputConnection.getExtractedText(ExtractedTextRequest(), 0)?.text ?: return
|
val originalText = inputConnection.getExtractedText(ExtractedTextRequest(), 0)?.text ?: return
|
||||||
|
@ -224,14 +229,17 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
||||||
keyboardMode = KEYBOARD_NUMBERS
|
keyboardMode = KEYBOARD_NUMBERS
|
||||||
R.xml.keys_numbers
|
R.xml.keys_numbers
|
||||||
}
|
}
|
||||||
|
|
||||||
TYPE_CLASS_PHONE -> {
|
TYPE_CLASS_PHONE -> {
|
||||||
keyboardMode = KEYBOARD_PHONE
|
keyboardMode = KEYBOARD_PHONE
|
||||||
R.xml.keys_phone
|
R.xml.keys_phone
|
||||||
}
|
}
|
||||||
|
|
||||||
TYPE_CLASS_DATETIME -> {
|
TYPE_CLASS_DATETIME -> {
|
||||||
keyboardMode = KEYBOARD_SYMBOLS
|
keyboardMode = KEYBOARD_SYMBOLS
|
||||||
R.xml.keys_symbols
|
R.xml.keys_symbols
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
keyboardMode = KEYBOARD_LETTERS
|
keyboardMode = KEYBOARD_LETTERS
|
||||||
getKeyboardLayoutXML()
|
getKeyboardLayoutXML()
|
||||||
|
|
Loading…
Reference in New Issue