mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-21 01:10:24 +00:00
update key labels
remove emoji label, not necessary any more as it's a toolbar key access toolbar labels via enum map allow CLIPBOARD_CUT key(code)
This commit is contained in:
parent
61cff40d3c
commit
3eafce9265
5 changed files with 16 additions and 12 deletions
|
@ -14,6 +14,7 @@ import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyCode
|
|||
import helium314.keyboard.latin.R
|
||||
import helium314.keyboard.latin.settings.Settings
|
||||
import helium314.keyboard.latin.utils.ToolbarKey.*
|
||||
import java.util.EnumMap
|
||||
import java.util.Locale
|
||||
|
||||
fun createToolbarKey(context: Context, keyboardAttr: TypedArray, key: ToolbarKey): ImageButton {
|
||||
|
@ -114,7 +115,7 @@ enum class ToolbarKey {
|
|||
FULL_LEFT, FULL_RIGHT, INCOGNITO, AUTOCORRECT, CLEAR_CLIPBOARD, CLOSE_HISTORY, EMOJI
|
||||
}
|
||||
|
||||
val toolbarKeyStrings: Set<String> = entries.mapTo(HashSet()) { it.toString().lowercase(Locale.US) }
|
||||
val toolbarKeyStrings = entries.associateWithTo(EnumMap(ToolbarKey::class.java)) { it.toString().lowercase(Locale.US) }
|
||||
|
||||
val defaultToolbarPref = entries.filterNot { it == CLOSE_HISTORY }.joinToString(";") {
|
||||
when (it) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue