feature(language): add vi string + config Vn

Signed-off-by: Hung <>
This commit is contained in:
Henry
2023-06-26 16:25:45 +07:00
committed by Hung
parent b57a0461cf
commit 01aeabdf9a
5 changed files with 72 additions and 3 deletions

View File

@ -418,6 +418,11 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
}
setupEmojiPalette(toolbarColor = toolbarColor, backgroundColor = mBackgroundColor, textColor = mTextColor)
if(context.config.keyboardLanguage == LANGUAGE_VIETNAMESE_TELEX){
setupLanguageTelex()
}else{
cachedVNTelexData.clear()
}
setupStoredClips()
}
@ -1506,6 +1511,13 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
}
}
// For Vietnamese - Telex
private fun setupLanguageTelex() {
ensureBackgroundThread {
parseRawJsonSpecsFile(context, LANGUAGE_VN_TELEX)
}
}
private fun setupEmojiAdapter(emojis: List<String>) {
mEmojiPaletteHolder?.emojis_list?.apply {
val emojiItemWidth = context.resources.getDimensionPixelSize(R.dimen.emoji_item_size)