adding the initial version of an own implementation of MyKeyboardView

This commit is contained in:
tibbi
2022-01-06 15:53:22 +01:00
parent 63ed037827
commit 46a33d2397
10 changed files with 2927 additions and 7 deletions

View File

@ -2,24 +2,24 @@ package com.simplemobiletools.keyboard.services
import android.inputmethodservice.InputMethodService
import android.inputmethodservice.Keyboard
import android.inputmethodservice.KeyboardView
import android.text.TextUtils
import android.view.KeyEvent
import android.view.View
import com.simplemobiletools.commons.extensions.performHapticFeedback
import com.simplemobiletools.keyboard.R
import com.simplemobiletools.keyboard.views.MyKeyboardView
// based on https://www.androidauthority.com/lets-build-custom-keyboard-android-832362/
class SimpleKeyboardIME : InputMethodService(), KeyboardView.OnKeyboardActionListener {
class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionListener {
private var keyboard: Keyboard? = null
private var keyboardView: KeyboardView? = null
private var keyboardView: MyKeyboardView? = null
private var caps = false
override fun onCreateInputView(): View {
keyboardView = layoutInflater.inflate(R.layout.keyboard_view, null) as KeyboardView
keyboardView = layoutInflater.inflate(R.layout.keyboard_view_keyboard, null) as MyKeyboardView
keyboard = Keyboard(this, R.xml.keys_layout)
keyboardView!!.keyboard = keyboard
keyboardView!!.setOnKeyboardActionListener(this)
keyboardView!!.onKeyboardActionListener = this
return keyboardView!!
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff