hardcode key height, we wont be changing it dynamically

This commit is contained in:
tibbi
2022-01-21 18:25:26 +01:00
parent 8004b2fd03
commit 99ac5e42b2
3 changed files with 1 additions and 4 deletions

View File

@ -203,7 +203,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
when (attr) {
R.styleable.MyKeyboardView_keyBackground -> mKeyBackground = attributes.getDrawable(attr)
R.styleable.MyKeyboardView_verticalCorrection -> mVerticalCorrection = 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)
@ -213,6 +212,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
attributes.recycle()
}
mPreviewHeight = resources.getDimension(R.dimen.key_height).toInt()
mSpaceMoveThreshold = resources.getDimension(R.dimen.medium_margin).toInt()
mTextColor = context.config.textColor
mBackgroundColor = context.config.backgroundColor