mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-25 17:16:43 +00:00
use original symbols as moreKeys on symbol number row
This commit is contained in:
parent
33ea631235
commit
ebd7e3fa24
2 changed files with 4 additions and 8 deletions
|
@ -86,8 +86,10 @@ abstract class KeyboardParser(private val params: KeyboardParams, private val co
|
|||
private fun createAlphaSymbolRows(baseKeys: MutableList<List<KeyData>>): ArrayList<ArrayList<KeyParams>> {
|
||||
// number row related modifications of baseKeys
|
||||
if (!params.mId.mNumberRowEnabled && params.mId.mElementId == KeyboardId.ELEMENT_SYMBOLS) {
|
||||
// replace first symbols row with number row
|
||||
baseKeys[0] = params.mLocaleKeyTexts.getNumberRow()
|
||||
// replace first symbols row with number row, but use the labels as moreKeys
|
||||
val numberRow = params.mLocaleKeyTexts.getNumberRow()
|
||||
numberRow.forEachIndexed { index, keyData -> keyData.popup.symbol = baseKeys[0].getOrNull(index)?.label }
|
||||
baseKeys[0] = numberRow
|
||||
} else if (!params.mId.mNumberRowEnabled && params.mId.isAlphabetKeyboard
|
||||
// todo: move this decision to some other place!
|
||||
&& !(params.mId.locale.language == "ko" && baseKeys.size == 4)
|
||||
|
|
|
@ -29,12 +29,6 @@ private const val MORE_KEYS_LANGUAGE = "more_keys_language"
|
|||
const val MORE_KEYS_LABEL_DEFAULT = "$MORE_KEYS_NUMBER,true;$MORE_KEYS_LANGUAGE_PRIORITY,false;$MORE_KEYS_LAYOUT,true;$MORE_KEYS_SYMBOLS,true;$MORE_KEYS_LANGUAGE,false"
|
||||
const val MORE_KEYS_ORDER_DEFAULT = "$MORE_KEYS_LANGUAGE_PRIORITY,true;$MORE_KEYS_NUMBER,true;$MORE_KEYS_SYMBOLS,true;$MORE_KEYS_LAYOUT,true;$MORE_KEYS_LANGUAGE,true"
|
||||
|
||||
// todo:
|
||||
// could be done later:
|
||||
// some way to allow hint labels in symbols layout
|
||||
// maybe put "language" moreKeys into a different category when not using alphabet layout
|
||||
// because disabling language moreKeys will remove e.g. quote moreKeys
|
||||
|
||||
fun createMoreKeysArray(popupSet: PopupSet<*>?, params: KeyboardParams, label: String): Array<String>? {
|
||||
// often moreKeys are empty, so we want to avoid unnecessarily creating sets
|
||||
val moreKeysDelegate = lazy { mutableSetOf<String>() }
|
||||
|
|
Loading…
Add table
Reference in a new issue