changing Keyboard to MyKeyboard on the remaining places
This commit is contained in:
parent
850878cfe8
commit
49ec711a60
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<MyKeyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:keyWidth="10%"
|
||||
android:keyHeight="60dp"
|
||||
android:keyBackground="@color/color_primary_dark"
|
||||
|
@ -126,4 +126,4 @@
|
|||
android:keyEdgeFlags="right"
|
||||
android:keyIcon="@drawable/ic_enter_vector" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
</MyKeyboard>
|
||||
|
|
Loading…
Reference in New Issue