hardcode key height, we wont be changing it dynamically
This commit is contained in:
parent
8004b2fd03
commit
99ac5e42b2
|
@ -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
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
<attr name="keyTextSize" format="dimension" />
|
||||
<!-- Size of the text for custom keys with some text and no icon. -->
|
||||
<attr name="labelTextSize" format="dimension" />
|
||||
<!-- Height of the key press feedback popup. -->
|
||||
<attr name="keyPreviewHeight" format="dimension" />
|
||||
<!-- Amount to offset the touch Y coordinate by, for bias correction. -->
|
||||
<attr name="verticalCorrection" format="dimension" />
|
||||
<!-- Layout resource for popup keyboards. -->
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
<style name="Widget.KeyboardView" parent="Widget">
|
||||
<item name="keyBackground">@drawable/keyboard_key_selector</item>
|
||||
<item name="keyTextSize">@dimen/keyboard_text_size</item>
|
||||
<item name="keyPreviewHeight">60dp</item>
|
||||
<item name="labelTextSize">16sp</item>
|
||||
<item name="popupLayout">@layout/keyboard_popup_keyboard</item>
|
||||
<item name="verticalCorrection">-10dp</item>
|
||||
|
|
Loading…
Reference in New Issue