mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-06-05 21:49:26 +02:00
removing mShiftKeys, it isnt needed
This commit is contained in:
@ -33,9 +33,6 @@ class MyKeyboard {
|
|||||||
/** Is the keyboard in the shifted state */
|
/** Is the keyboard in the shifted state */
|
||||||
var mShiftState = SHIFT_OFF
|
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 */
|
/** Total height of the keyboard, including the padding and keys */
|
||||||
var mHeight = 0
|
var mHeight = 0
|
||||||
|
|
||||||
@ -475,15 +472,7 @@ class MyKeyboard {
|
|||||||
inKey = true
|
inKey = true
|
||||||
key = createKeyFromXml(res, currentRow!!, x, y, parser)
|
key = createKeyFromXml(res, currentRow!!, x, y, parser)
|
||||||
mKeys!!.add(key)
|
mKeys!!.add(key)
|
||||||
if (key.codes[0] == KEYCODE_SHIFT) {
|
if (key.codes[0] == KEYCODE_ENTER) {
|
||||||
// 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) {
|
|
||||||
val enterResourceId = when (mEnterKeyType) {
|
val enterResourceId = when (mEnterKeyType) {
|
||||||
EditorInfo.IME_ACTION_SEARCH -> R.drawable.ic_search_vector
|
EditorInfo.IME_ACTION_SEARCH -> R.drawable.ic_search_vector
|
||||||
EditorInfo.IME_ACTION_NEXT, EditorInfo.IME_ACTION_GO -> R.drawable.ic_arrow_right_vector
|
EditorInfo.IME_ACTION_NEXT, EditorInfo.IME_ACTION_GO -> R.drawable.ic_arrow_right_vector
|
||||||
|
@ -5,7 +5,6 @@ import android.content.Context
|
|||||||
import android.graphics.*
|
import android.graphics.*
|
||||||
import android.graphics.Paint.Align
|
import android.graphics.Paint.Align
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.inputmethodservice.KeyboardView
|
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Message
|
import android.os.Message
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
|
Reference in New Issue
Block a user