Skip to content

Commit acb82a5

Browse files
fix: remove numbers from popup character if showNumbersRow is enabled.
1 parent 7bb026b commit acb82a5

File tree

1 file changed

+10
-0
lines changed
  • app/src/main/kotlin/com/simplemobiletools/keyboard/helpers

1 file changed

+10
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/MyKeyboard.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,16 @@ class MyKeyboard {
360360
}
361361
inKey = true
362362
key = createKeyFromXml(res, currentRow!!, x, y, parser)
363+
if(context.config.showNumbersRow){
364+
// Removes numbers (i.e 0-9) from the popupCharacters if numbers row is enabled
365+
key.apply{
366+
popupCharacters = popupCharacters?.replace(Regex("\\d+"), "")
367+
if(popupCharacters.isNullOrEmpty()){
368+
popupResId = 0
369+
}
370+
}
371+
372+
}
363373
mKeys!!.add(key)
364374
if (key.code == KEYCODE_ENTER) {
365375
val enterResourceId = when (mEnterKeyType) {

0 commit comments

Comments
 (0)