mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-06-05 21:49:26 +02:00
removing the unused iconPreview key attribute too
This commit is contained in:
@ -151,7 +151,6 @@ class MyKeyboard {
|
||||
* @attr ref android.R.styleable#Keyboard_Key_codes
|
||||
* @attr ref android.R.styleable#Keyboard_Key_keyIcon
|
||||
* @attr ref android.R.styleable#Keyboard_Key_keyLabel
|
||||
* @attr ref android.R.styleable#Keyboard_Key_iconPreview
|
||||
* @attr ref android.R.styleable#Keyboard_Key_isRepeatable
|
||||
* @attr ref android.R.styleable#Keyboard_Key_popupKeyboard
|
||||
* @attr ref android.R.styleable#Keyboard_Key_popupCharacters
|
||||
@ -170,9 +169,6 @@ class MyKeyboard {
|
||||
/** Icon to display instead of a label. Icon takes precedence over a label */
|
||||
var icon: Drawable? = null
|
||||
|
||||
/** Preview version of the icon, for the preview popup */
|
||||
var iconPreview: Drawable? = null
|
||||
|
||||
/** Width of the key, not including the gap */
|
||||
var width: Int
|
||||
|
||||
@ -241,9 +237,6 @@ class MyKeyboard {
|
||||
codes = parseCSV(codesValue.string.toString())
|
||||
}
|
||||
|
||||
iconPreview = a.getDrawable(R.styleable.MyKeyboard_Key_iconPreview)
|
||||
iconPreview?.setBounds(0, 0, iconPreview!!.intrinsicWidth, iconPreview!!.intrinsicHeight)
|
||||
|
||||
popupCharacters = a.getText(R.styleable.MyKeyboard_Key_popupCharacters)
|
||||
popupResId = a.getResourceId(R.styleable.MyKeyboard_Key_popupKeyboard, 0)
|
||||
repeatable = a.getBoolean(R.styleable.MyKeyboard_Key_isRepeatable, false)
|
||||
|
@ -670,12 +670,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||
|
||||
val key = keys[keyIndex]
|
||||
if (key.icon != null) {
|
||||
val bottomDrawable = if (key.iconPreview != null) {
|
||||
key.iconPreview
|
||||
} else {
|
||||
key.icon
|
||||
}
|
||||
mPreviewText!!.setCompoundDrawables(null, null, null, bottomDrawable)
|
||||
mPreviewText!!.setCompoundDrawables(null, null, null, key.icon)
|
||||
} else {
|
||||
mPreviewText!!.setCompoundDrawables(null, null, null, null)
|
||||
try {
|
||||
|
Reference in New Issue
Block a user