show a number above the letters in the first row

This commit is contained in:
tibbi
2022-01-15 14:24:56 +01:00
parent e999e4900b
commit 3c4d2f0ee3
5 changed files with 49 additions and 12 deletions

View File

@ -212,6 +212,9 @@ class MyKeyboard {
/** Label to display */
var label: CharSequence = ""
/** First row of letters can also be used for inserting numbers by long pressing them, show those numbers */
var topSmallNumber: String = ""
/** Icon to display instead of a label. Icon takes precedence over a label */
var icon: Drawable? = null
@ -307,6 +310,7 @@ class MyKeyboard {
label = a.getText(R.styleable.MyKeyboard_Key_keyLabel) ?: ""
text = a.getText(R.styleable.MyKeyboard_Key_keyOutputText)
topSmallNumber = a.getString(R.styleable.MyKeyboard_Key_topSmallNumber) ?: ""
if (label.isNotEmpty()) {
codes = arrayListOf(label[0].toInt())