From 4b45826480aada4b09307e791438efed1d139027 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 21 Jan 2022 18:01:00 +0100 Subject: [PATCH] removing some more unused attributes --- .../simplemobiletools/keyboard/views/MyKeyboardView.kt | 8 +------- app/src/main/res/values/attrs.xml | 9 --------- app/src/main/res/values/styles.xml | 3 --- 3 files changed, 1 insertion(+), 19 deletions(-) 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 3335b11..d6c3478 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt @@ -62,8 +62,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut private var mLabelTextSize = 0 private var mKeyTextSize = 0 - private var mShadowRadius = 0f - private var mShadowColor = 0 private val mBackgroundDimAmount: Float private var mTextColor = 0 @@ -73,7 +71,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut private var mPreviewText: TextView? = null private val mPreviewPopup: PopupWindow private var mPreviewTextSizeLarge = 0 - private var mPreviewOffset = 0 private var mPreviewHeight = 0 // Working variable @@ -218,13 +215,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut R.styleable.MyKeyboardView_keyBackground -> mKeyBackground = attributes.getDrawable(attr) R.styleable.MyKeyboardView_verticalCorrection -> mVerticalCorrection = attributes.getDimensionPixelOffset(attr, 0) R.styleable.MyKeyboardView_keyPreviewLayout -> previewLayout = attributes.getResourceId(attr, 0) - R.styleable.MyKeyboardView_keyPreviewOffset -> mPreviewOffset = attributes.getDimensionPixelOffset(attr, 0) R.styleable.MyKeyboardView_keyPreviewHeight -> mPreviewHeight = attributes.getDimensionPixelSize(attr, 80) R.styleable.MyKeyboardView_keyTextSize -> mKeyTextSize = attributes.getDimensionPixelSize(attr, 18) R.styleable.MyKeyboardView_labelTextSize -> mLabelTextSize = attributes.getDimensionPixelSize(attr, 14) R.styleable.MyKeyboardView_popupLayout -> mPopupLayout = attributes.getResourceId(attr, 0) - R.styleable.MyKeyboardView_shadowColor -> mShadowColor = attributes.getColor(attr, 0) - R.styleable.MyKeyboardView_shadowRadius -> mShadowRadius = attributes.getFloat(attr, 0f) } } } finally { @@ -778,7 +772,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut if (!mPreviewCentered) { mPopupPreviewX = key.x - mPreviewText!!.paddingLeft + paddingLeft - mPopupPreviewY = key.y - popupHeight + mPreviewOffset + mPopupPreviewY = key.y - popupHeight } else { // TODO: Fix this if centering is brought back mPopupPreviewX = 160 - mPreviewText!!.measuredWidth / 2 diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index bae2e14..30de08e 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -17,21 +17,12 @@ - - - - - - - - - diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index f7a6354..c7657d4 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -11,13 +11,10 @@ 22sp #FFFFFFFF @layout/keyboard_key_preview - 0dp 60dp 16sp @layout/keyboard_popup_keyboard -10dp - #BB000000 - 2.75