From 49ec711a60319c47529d9d7deb622ecc4c067274 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 8 Jan 2022 20:30:00 +0100 Subject: [PATCH] changing Keyboard to MyKeyboard on the remaining places --- .../com/simplemobiletools/keyboard/helpers/MyKeyboard.kt | 7 +------ .../keyboard/services/SimpleKeyboardIME.kt | 1 - .../com/simplemobiletools/keyboard/views/MyKeyboardView.kt | 7 +++---- app/src/main/res/xml/keys_layout.xml | 4 ++-- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/MyKeyboard.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/MyKeyboard.kt index a620e38..76a63ad 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/MyKeyboard.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/MyKeyboard.kt @@ -193,11 +193,7 @@ class MyKeyboard { constructor(res: Resources, parent: MyKeyboard, parser: XmlResourceParser?) { this.parent = parent - var a = res.obtainAttributes( - Xml.asAttributeSet(parser), - R.styleable.Keyboard - ) - + var a = res.obtainAttributes(Xml.asAttributeSet(parser), R.styleable.Keyboard) defaultWidth = getDimensionOrFraction(a, R.styleable.Keyboard_keyWidth, parent.mDisplayWidth, parent.mDefaultWidth) defaultHeight = getDimensionOrFraction(a, R.styleable.Keyboard_keyHeight, parent.mDisplayHeight, parent.mDefaultHeight) defaultHorizontalGap = getDimensionOrFraction(a, R.styleable.Keyboard_horizontalGap, parent.mDisplayWidth, parent.mDefaultHorizontalGap) @@ -522,7 +518,6 @@ class MyKeyboard { val dm = context.resources.displayMetrics mDisplayWidth = dm.widthPixels mDisplayHeight = dm.heightPixels - //Log.v(TAG, "keyboard's display metrics:" + dm); mDefaultHorizontalGap = 0 mDefaultWidth = mDisplayWidth / 10 mDefaultVerticalGap = 0 diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt index 1031192..e508b17 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt @@ -1,7 +1,6 @@ package com.simplemobiletools.keyboard.services import android.inputmethodservice.InputMethodService -import android.inputmethodservice.Keyboard import android.text.TextUtils import android.view.KeyEvent import android.view.View diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt index b4f4638..52dbf3c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt @@ -5,7 +5,6 @@ import android.content.Context import android.graphics.* import android.graphics.Paint.Align import android.graphics.drawable.Drawable -import android.inputmethodservice.Keyboard import android.media.AudioManager import android.os.Handler import android.os.Message @@ -22,7 +21,7 @@ import com.simplemobiletools.keyboard.helpers.MyKeyboard import java.util.* /** - * A view that renders a virtual [Keyboard]. It handles rendering of keys and + * A view that renders a virtual [MyKeyboard]. It handles rendering of keys and * detecting key presses and touch movements. * * @attr ref android.R.styleable#KeyboardView_keyBackground @@ -383,7 +382,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut /** * Attaches a keyboard to this view. The keyboard can be switched at any time and the * view will re-layout itself to accommodate the keyboard. - * @see Keyboard + * @see MyKeyboard * * @see .getKeyboard * @param keyboard the keyboard to display in this view @@ -912,7 +911,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut * Invalidates a key so that it will be redrawn on the next repaint. Use this method if only * one key is changing it's content. Any changes that affect the position or size of the key * may not be honored. - * @param keyIndex the index of the key in the attached [Keyboard]. + * @param keyIndex the index of the key in the attached [MyKeyboard]. * @see .invalidateAllKeys */ fun invalidateKey(keyIndex: Int) { diff --git a/app/src/main/res/xml/keys_layout.xml b/app/src/main/res/xml/keys_layout.xml index 9c952d0..be8d302 100644 --- a/app/src/main/res/xml/keys_layout.xml +++ b/app/src/main/res/xml/keys_layout.xml @@ -1,5 +1,5 @@ - - +