removing mShiftKeys, it isnt needed

This commit is contained in:
tibbi 2022-01-21 22:46:32 +01:00
parent b499557574
commit af9d017fed
2 changed files with 1 additions and 13 deletions

View file

@ -33,9 +33,6 @@ class MyKeyboard {
/** Is the keyboard in the shifted state */
var mShiftState = SHIFT_OFF
/** Key instance for the shift key, if present */
private val mShiftKeys = arrayOf<Key?>(null, null)
/** Total height of the keyboard, including the padding and keys */
var mHeight = 0
@ -475,15 +472,7 @@ class MyKeyboard {
inKey = true
key = createKeyFromXml(res, currentRow!!, x, y, parser)
mKeys!!.add(key)
if (key.codes[0] == KEYCODE_SHIFT) {
// Find available shift key slot and put this shift key in it
for (i in mShiftKeys.indices) {
if (mShiftKeys[i] == null) {
mShiftKeys[i] = key
break
}
}
} else if (key.codes[0] == KEYCODE_ENTER) {
if (key.codes[0] == KEYCODE_ENTER) {
val enterResourceId = when (mEnterKeyType) {
EditorInfo.IME_ACTION_SEARCH -> R.drawable.ic_search_vector
EditorInfo.IME_ACTION_NEXT, EditorInfo.IME_ACTION_GO -> R.drawable.ic_arrow_right_vector

View file

@ -5,7 +5,6 @@ import android.content.Context
import android.graphics.*
import android.graphics.Paint.Align
import android.graphics.drawable.Drawable
import android.inputmethodservice.KeyboardView
import android.os.Handler
import android.os.Message
import android.util.AttributeSet