removing some more unused attributes
This commit is contained in:
parent
80963a35d2
commit
4b45826480
|
@ -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
|
||||
|
|
|
@ -17,21 +17,12 @@
|
|||
<attr name="keyTextColor" format="color" />
|
||||
<!-- Layout resource for key press feedback. -->
|
||||
<attr name="keyPreviewLayout" format="reference" />
|
||||
<!-- Vertical offset of the key press feedback from the key. -->
|
||||
<attr name="keyPreviewOffset" 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. -->
|
||||
<attr name="popupLayout" format="reference" />
|
||||
<attr name="shadowColor" format="color" />
|
||||
<!-- Horizontal offset of the text shadow. -->
|
||||
<attr name="shadowDx" format="dimension" />
|
||||
<!-- Vertical offset of the text shadow. -->
|
||||
<attr name="shadowDy" format="dimension" />
|
||||
<!-- Blur radius of the text shadow. -->
|
||||
<attr name="shadowRadius" format="float" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="MyKeyboard">
|
||||
|
|
|
@ -11,13 +11,10 @@
|
|||
<item name="keyTextSize">22sp</item>
|
||||
<item name="keyTextColor">#FFFFFFFF</item>
|
||||
<item name="keyPreviewLayout">@layout/keyboard_key_preview</item>
|
||||
<item name="keyPreviewOffset">0dp</item>
|
||||
<item name="keyPreviewHeight">60dp</item>
|
||||
<item name="labelTextSize">16sp</item>
|
||||
<item name="popupLayout">@layout/keyboard_popup_keyboard</item>
|
||||
<item name="verticalCorrection">-10dp</item>
|
||||
<item name="shadowColor">#BB000000</item>
|
||||
<item name="shadowRadius">2.75</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.KeyboardViewPopup" parent="Widget.KeyboardView">
|
||||
|
|
Loading…
Reference in New Issue