mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-06-05 21:49:26 +02:00
adding the alternative symbol keyboards
This commit is contained in:
@ -312,7 +312,7 @@ class MyKeyboard {
|
||||
text = a.getText(R.styleable.MyKeyboard_Key_keyOutputText)
|
||||
topSmallNumber = a.getString(R.styleable.MyKeyboard_Key_topSmallNumber) ?: ""
|
||||
|
||||
if (label.isNotEmpty()) {
|
||||
if (label.isNotEmpty() && codes.firstOrNull() != KEYCODE_MODE_CHANGE) {
|
||||
codes = arrayListOf(label[0].toInt())
|
||||
}
|
||||
a.recycle()
|
||||
|
@ -22,7 +22,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
||||
|
||||
override fun onCreateInputView(): View {
|
||||
keyboardView = layoutInflater.inflate(R.layout.keyboard_view_keyboard, null) as MyKeyboardView
|
||||
keyboard = MyKeyboard(this, R.xml.keys_layout)
|
||||
keyboard = MyKeyboard(this, R.xml.keys_letters)
|
||||
keyboardView!!.setKeyboard(keyboard!!)
|
||||
keyboardView!!.onKeyboardActionListener = this
|
||||
return keyboardView!!
|
||||
@ -66,6 +66,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
||||
keyboardView!!.invalidateAllKeys()
|
||||
}
|
||||
MyKeyboard.KEYCODE_DONE -> inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER))
|
||||
MyKeyboard.KEYCODE_MODE_CHANGE -> {}
|
||||
else -> {
|
||||
var code = primaryCode.toChar()
|
||||
if (Character.isLetter(code) && keyboard!!.shiftState > SHIFT_OFF) {
|
||||
|
@ -879,7 +879,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||
mPopupPreviewY += popupHeight
|
||||
}
|
||||
|
||||
if (key.label.isNotEmpty()) {
|
||||
if (key.label.isNotEmpty() && key.codes.firstOrNull() != KEYCODE_MODE_CHANGE) {
|
||||
if (previewPopup.isShowing) {
|
||||
previewPopup.update(mPopupPreviewX, mPopupPreviewY, popupWidth, popupHeight)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user