Merge pull request #71 from Naveen3Singh/feature_emojis

Add emojis
This commit is contained in:
Tibor Kaputa 2022-07-31 17:12:05 +02:00 committed by GitHub
commit 97393d2a43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
63 changed files with 4229 additions and 59 deletions

View File

@ -66,6 +66,7 @@ android {
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:c05de1687e'
implementation 'androidx.emoji2:emoji2-bundled:1.1.0'
kapt 'androidx.room:room-compiler:2.4.2'
implementation 'androidx.room:room-runtime:2.4.2'

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,19 @@
package com.simplemobiletools.keyboard
import android.app.Application
import androidx.emoji2.bundled.BundledEmojiCompatConfig
import androidx.emoji2.text.EmojiCompat
import com.simplemobiletools.commons.extensions.checkUseEnglish
class App : Application() {
override fun onCreate() {
super.onCreate()
checkUseEnglish()
setupEmojiCompat()
}
private fun setupEmojiCompat() {
val config = BundledEmojiCompatConfig(this)
EmojiCompat.init(config)
}
}

View File

@ -0,0 +1,46 @@
package com.simplemobiletools.keyboard.adapters
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.emoji2.text.EmojiCompat
import androidx.recyclerview.widget.RecyclerView
import com.simplemobiletools.keyboard.R
import kotlinx.android.synthetic.main.item_emoji.view.*
class EmojisAdapter(val context: Context, var items: List<String>, val itemClick: (emoji: String) -> Unit) : RecyclerView.Adapter<EmojisAdapter.ViewHolder>() {
private val layoutInflater = LayoutInflater.from(context)
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): EmojisAdapter.ViewHolder {
val layoutId = R.layout.item_emoji
val view = layoutInflater.inflate(layoutId, parent, false)
return ViewHolder(view)
}
override fun onBindViewHolder(holder: EmojisAdapter.ViewHolder, position: Int) {
val item = items[position]
holder.bindView(item) { itemView ->
setupEmoji(itemView, item)
}
}
override fun getItemCount() = items.size
private fun setupEmoji(view: View, emoji: String) {
val processed = EmojiCompat.get().process(emoji)
view.emoji_value.text = processed
}
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
fun bindView(emoji: String, callback: (itemView: View) -> Unit): View {
return itemView.apply {
callback(this)
setOnClickListener {
itemClick.invoke(emoji)
}
}
}
}
}

View File

@ -0,0 +1,12 @@
package com.simplemobiletools.keyboard.extensions
import androidx.recyclerview.widget.RecyclerView
fun RecyclerView.onScroll(scroll: (Int) -> Unit) {
addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
scroll(computeVerticalScrollOffset())
}
})
}

View File

@ -26,3 +26,6 @@ const val LANGUAGE_GERMAN = 5
const val LANGUAGE_ENGLISH_DVORAK = 6
const val LANGUAGE_ROMANIAN = 7
const val LANGUAGE_SLOVENIAN = 8
const val EMOJI_SPEC_FILE_PATH = "media/emoji_spec.txt"

View File

@ -0,0 +1,61 @@
package com.simplemobiletools.keyboard.helpers
import android.content.Context
private var cachedEmojiData: MutableList<String>? = null
/**
* Reads the emoji list at the given [path] and returns an parsed [MutableList]. If the
* given file path does not exist, an empty [MutableList] is returned.
*
* @param context The initiating view's context.
* @param path The path to the asset file.
*/
fun parseRawEmojiSpecsFile(context: Context, path: String): MutableList<String> {
if (cachedEmojiData != null) {
return cachedEmojiData!!
}
val emojis = mutableListOf<String>()
var emojiEditorList: MutableList<String>? = null
fun commitEmojiEditorList() {
emojiEditorList?.let {
// add only the base emoji for now, ignore the variations
emojis.add(it.first())
}
emojiEditorList = null
}
context.assets.open(path).bufferedReader().useLines { lines ->
for (line in lines) {
if (line.startsWith("#")) {
// Comment line
} else if (line.startsWith("[")) {
commitEmojiEditorList()
} else if (line.trim().isEmpty()) {
// Empty line
continue
} else {
if (!line.startsWith("\t")) {
commitEmojiEditorList()
}
// Assume it is a data line
val data = line.split(";")
if (data.size == 3) {
val emoji = data[0].trim()
if (emojiEditorList != null) {
emojiEditorList!!.add(emoji)
} else {
emojiEditorList = mutableListOf(emoji)
}
}
}
}
commitEmojiEditorList()
}
cachedEmojiData = emojis
return emojis
}

View File

@ -12,7 +12,6 @@ import android.view.inputmethod.EditorInfo
import android.view.inputmethod.EditorInfo.IME_ACTION_NONE
import androidx.annotation.XmlRes
import com.simplemobiletools.keyboard.R
import java.util.*
/**
* Loads an XML description of a keyboard and stores the attributes of the keys. A keyboard consists of rows of keys.
@ -61,6 +60,7 @@ class MyKeyboard {
const val KEYCODE_ENTER = -4
const val KEYCODE_DELETE = -5
const val KEYCODE_SPACE = 32
const val KEYCODE_EMOJI = -6
fun getDimensionOrFraction(a: TypedArray, index: Int, base: Int, defValue: Int): Int {
val value = a.peekValue(index) ?: return defValue
@ -203,7 +203,7 @@ class MyKeyboard {
topSmallNumber = a.getString(R.styleable.MyKeyboard_Key_topSmallNumber) ?: ""
if (label.isNotEmpty() && code != KEYCODE_MODE_CHANGE && code != KEYCODE_SHIFT) {
code = label[0].toInt()
code = label[0].code
}
a.recycle()
}
@ -281,7 +281,7 @@ class MyKeyboard {
key.x = x
key.y = y
key.label = character.toString()
key.code = character.toInt()
key.code = character.code
column++
x += key.width + key.gap
mKeys!!.add(key)

View File

@ -45,6 +45,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
keyboardView = keyboardHolder.keyboard_view as MyKeyboardView
keyboardView!!.setKeyboard(keyboard!!)
keyboardView!!.setKeyboardHolder(keyboardHolder.keyboard_holder)
keyboardView!!.setEditorInfo(currentInputEditorInfo)
keyboardView!!.mOnKeyboardActionListener = this
return keyboardHolder!!
}
@ -73,6 +74,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
keyboard = MyKeyboard(this, keyboardXml, enterKeyType)
keyboardView?.setKeyboard(keyboard!!)
keyboardView?.setEditorInfo(attribute)
updateShiftKeyState()
}
@ -106,7 +108,8 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
val selectedText = inputConnection.getSelectedText(0)
if (TextUtils.isEmpty(selectedText)) {
inputConnection.deleteSurroundingText(1, 0)
inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL))
inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL))
} else {
inputConnection.commitText("", 1)
}
@ -155,6 +158,9 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
keyboard = MyKeyboard(this, keyboardXml, enterKeyType)
keyboardView!!.setKeyboard(keyboard!!)
}
MyKeyboard.KEYCODE_EMOJI -> {
keyboardView?.openEmojiPalette()
}
else -> {
var codeChar = code.toChar()
if (Character.isLetter(codeChar) && keyboard!!.mShiftState > SHIFT_OFF) {

View File

@ -0,0 +1,38 @@
package com.simplemobiletools.keyboard.views
import android.content.Context
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import kotlin.math.max
/**
* RecyclerView GridLayoutManager but with automatic spanCount calculation.
*
* @param context The initiating view's context.
* @param itemWidth: Grid item width in pixels. Will be used to calculate span count.
*/
class AutoGridLayoutManager(
context: Context,
private var itemWidth: Int
) : GridLayoutManager(context, 1) {
init {
require(itemWidth >= 0) {
"itemWidth must be >= 0"
}
}
override fun onLayoutChildren(recycler: RecyclerView.Recycler?, state: RecyclerView.State?) {
val width = width
val height = height
if (itemWidth > 0 && width > 0 && height > 0) {
val totalSpace = if (orientation == VERTICAL) {
width - paddingRight - paddingLeft
} else {
height - paddingTop - paddingBottom
}
spanCount = max(1, totalSpace / itemWidth)
}
super.onLayoutChildren(recycler, state)
}
}

View File

@ -22,10 +22,13 @@ import android.view.*
import android.view.accessibility.AccessibilityEvent
import android.view.accessibility.AccessibilityManager
import android.view.animation.AccelerateInterpolator
import android.view.inputmethod.EditorInfo
import android.widget.PopupWindow
import android.widget.TextView
import androidx.core.animation.doOnEnd
import androidx.core.animation.doOnStart
import androidx.emoji2.text.EmojiCompat
import androidx.emoji2.text.EmojiCompat.EMOJI_SUPPORTED
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.helpers.isPiePlus
@ -33,12 +36,11 @@ import com.simplemobiletools.keyboard.R
import com.simplemobiletools.keyboard.activities.ManageClipboardItemsActivity
import com.simplemobiletools.keyboard.activities.SettingsActivity
import com.simplemobiletools.keyboard.adapters.ClipsKeyboardAdapter
import com.simplemobiletools.keyboard.extensions.clipsDB
import com.simplemobiletools.keyboard.extensions.config
import com.simplemobiletools.keyboard.extensions.getCurrentClip
import com.simplemobiletools.keyboard.extensions.getStrokeColor
import com.simplemobiletools.keyboard.adapters.EmojisAdapter
import com.simplemobiletools.keyboard.extensions.*
import com.simplemobiletools.keyboard.helpers.*
import com.simplemobiletools.keyboard.helpers.MyKeyboard.Companion.KEYCODE_DELETE
import com.simplemobiletools.keyboard.helpers.MyKeyboard.Companion.KEYCODE_EMOJI
import com.simplemobiletools.keyboard.helpers.MyKeyboard.Companion.KEYCODE_ENTER
import com.simplemobiletools.keyboard.helpers.MyKeyboard.Companion.KEYCODE_MODE_CHANGE
import com.simplemobiletools.keyboard.helpers.MyKeyboard.Companion.KEYCODE_SHIFT
@ -51,7 +53,7 @@ import kotlinx.android.synthetic.main.keyboard_popup_keyboard.view.*
import kotlinx.android.synthetic.main.keyboard_view_keyboard.view.*
import java.util.*
@SuppressLint("UseCompatLoadingForDrawables")
@SuppressLint("UseCompatLoadingForDrawables", "ClickableViewAccessibility")
class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: AttributeSet?, defStyleRes: Int = 0) :
View(context, attrs, defStyleRes) {
@ -153,6 +155,8 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
private var mToolbarHolder: View? = null
private var mClipboardManagerHolder: View? = null
private var mEmojiPaletteHolder: View? = null
private var emojiCompatMetadataVersion = 0
// For multi-tap
private var mLastTapTime = 0L
@ -262,6 +266,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
override fun onVisibilityChanged(changedView: View, visibility: Int) {
super.onVisibilityChanged(changedView, visibility)
closeClipboardManager()
closeEmojiPalette()
if (visibility == VISIBLE) {
mTextColor = context.getProperTextColor()
@ -331,6 +336,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
clipboard_content_placeholder_2.setTextColor(mTextColor)
}
setupEmojiPalette(toolbarColor = toolbarColor, backgroundColor = mBackgroundColor, textColor = mTextColor)
setupStoredClips()
}
}
@ -364,6 +370,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
fun setKeyboardHolder(keyboardHolder: View) {
mToolbarHolder = keyboardHolder.toolbar_holder
mClipboardManagerHolder = keyboardHolder.clipboard_manager_holder
mEmojiPaletteHolder = keyboardHolder.emoji_palette_holder
mToolbarHolder!!.apply {
settings_cog.setOnLongClickListener { context.toast(R.string.settings); true; }
@ -412,6 +419,17 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
}
}
}
mEmojiPaletteHolder!!.apply {
emoji_palette_close.setOnClickListener {
vibrateIfNeeded()
closeEmojiPalette()
}
}
}
fun setEditorInfo(editorInfo: EditorInfo) {
emojiCompatMetadataVersion = editorInfo.extras?.getInt(EmojiCompat.EDITOR_INFO_METAVERSION_KEY, 0) ?: 0
}
fun vibrateIfNeeded() {
@ -436,7 +454,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
* @return true if the shift is in a pressed state, false otherwise
*/
private fun isShifted(): Boolean {
return mKeyboard?.mShiftState ?: SHIFT_OFF > SHIFT_OFF
return (mKeyboard?.mShiftState ?: SHIFT_OFF) > SHIFT_OFF
}
private fun setPopupOffset(x: Int, y: Int) {
@ -450,7 +468,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
private fun adjustCase(label: CharSequence): CharSequence? {
var newLabel: CharSequence? = label
if (newLabel != null && newLabel.isNotEmpty() && mKeyboard!!.mShiftState > SHIFT_OFF && newLabel.length < 3 && Character.isLowerCase(newLabel[0])) {
newLabel = newLabel.toString().toUpperCase()
newLabel = newLabel.toString().uppercase(Locale.getDefault())
}
return newLabel
}
@ -607,7 +625,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
if (code == KEYCODE_ENTER) {
key.icon!!.applyColorFilter(mPrimaryColor.getContrastColor())
} else if (code == KEYCODE_DELETE || code == KEYCODE_SHIFT) {
} else if (code == KEYCODE_DELETE || code == KEYCODE_SHIFT || code == KEYCODE_EMOJI) {
key.icon!!.applyColorFilter(mTextColor)
}
@ -1372,6 +1390,94 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
mClipboardManagerHolder?.clips_list?.adapter = adapter
}
private fun setupEmojiPalette(toolbarColor: Int, backgroundColor: Int, textColor: Int) {
mEmojiPaletteHolder?.apply {
emoji_palette_top_bar.background = ColorDrawable(toolbarColor)
emoji_palette_holder.background = ColorDrawable(backgroundColor)
emoji_palette_close.applyColorFilter(textColor)
emoji_palette_label.setTextColor(textColor)
emoji_palette_bottom_bar.background = ColorDrawable(backgroundColor)
val bottomTextColor = textColor.darkenColor()
emoji_palette_mode_change.apply {
setTextColor(bottomTextColor)
setOnClickListener {
vibrateIfNeeded()
closeEmojiPalette()
}
}
emoji_palette_backspace.apply {
applyColorFilter(bottomTextColor)
setOnTouchListener { _, event ->
when (event.action) {
MotionEvent.ACTION_DOWN -> {
isPressed = true
mRepeatKeyIndex = mKeys.indexOfFirst { it.code == KEYCODE_DELETE }
mCurrentKey = mRepeatKeyIndex
vibrateIfNeeded()
mOnKeyboardActionListener!!.onKey(KEYCODE_DELETE)
// setup repeating backspace
val msg = mHandler!!.obtainMessage(MSG_REPEAT)
mHandler!!.sendMessageDelayed(msg, REPEAT_START_DELAY.toLong())
true
}
MotionEvent.ACTION_UP -> {
mHandler!!.removeMessages(MSG_REPEAT)
mRepeatKeyIndex = NOT_A_KEY
isPressed = false
false
}
else -> false
}
}
}
}
setupEmojis()
}
fun openEmojiPalette() {
mEmojiPaletteHolder!!.emoji_palette_holder.beVisible()
setupEmojis()
}
private fun closeEmojiPalette() {
mEmojiPaletteHolder?.apply {
emoji_palette_holder?.beGone()
mEmojiPaletteHolder?.emojis_list?.scrollToPosition(0)
}
}
private fun setupEmojis() {
ensureBackgroundThread {
val fullEmojiList = parseRawEmojiSpecsFile(context, EMOJI_SPEC_FILE_PATH)
val systemFontPaint = Paint().apply {
typeface = Typeface.DEFAULT
}
val emojis = fullEmojiList.filter { emoji ->
systemFontPaint.hasGlyph(emoji) || EmojiCompat.get().getEmojiMatch(emoji, emojiCompatMetadataVersion) == EMOJI_SUPPORTED
}
Handler(Looper.getMainLooper()).post {
setupEmojiAdapter(emojis)
}
}
}
private fun setupEmojiAdapter(emojis: List<String>) {
val emojiItemWidth = context.resources.getDimensionPixelSize(R.dimen.emoji_item_size)
val emojiTopBarElevation = context.resources.getDimensionPixelSize(R.dimen.emoji_top_bar_elevation).toFloat()
mEmojiPaletteHolder!!.emojis_list.apply {
layoutManager = AutoGridLayoutManager(context, emojiItemWidth)
adapter = EmojisAdapter(context = context, items = emojis) { emoji ->
mOnKeyboardActionListener!!.onText(emoji)
vibrateIfNeeded()
}
onScroll {
mEmojiPaletteHolder!!.emoji_palette_top_bar.elevation = if (it > 4) emojiTopBarElevation else 0f
}
}
}
private fun closing() {
if (mPreviewPopup.isShowing) {
mPreviewPopup.dismiss()

View File

@ -0,0 +1,4 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:fillColor="#FFFFFFFF" android:pathData="M14 9.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 1 1-3 0m-7 0a1.5 1.5 0 1 1 3 0 1.5 1.5 0 1 1-3 0m5 8.5c2.28 0 4.22-1.66 5-4H7c0.78 2.34 2.72 4 5 4z"/>
<path android:fillColor="#FFFFFFFF" android:pathData="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>
</vector>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="#000000" />
<corners android:radius="@dimen/normal_margin" />
</shape>
</item>
</ripple>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.AppCompatTextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/emoji_value"
android:layout_width="@dimen/emoji_item_size"
android:layout_height="@dimen/emoji_item_size"
android:background="@drawable/ripple_all_corners_medium"
android:gravity="center"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
android:textSize="@dimen/emoji_text_size"
tools:text="😇" />

View File

@ -105,6 +105,100 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<RelativeLayout
android:id="@+id/emoji_palette_holder"
android:layout_width="match_parent"
android:layout_height="0dp"
android:clickable="true"
android:focusable="true"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/toolbar_holder">
<RelativeLayout
android:id="@+id/emoji_palette_top_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:gravity="center_vertical">
<ImageView
android:id="@+id/emoji_palette_close"
android:layout_width="@dimen/toolbar_icon_height"
android:layout_height="@dimen/toolbar_icon_height"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/medium_margin"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/emojis"
android:padding="@dimen/small_margin"
android:src="@drawable/ic_arrow_left_vector" />
<TextView
android:id="@+id/emoji_palette_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/medium_margin"
android:layout_toEndOf="@+id/emoji_palette_close"
android:ellipsize="end"
android:lines="1"
android:text="@string/emojis"
android:textSize="@dimen/big_text_size" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/emoji_content_holder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/emoji_palette_bottom_bar"
android:layout_below="@+id/emoji_palette_top_bar">
<com.simplemobiletools.commons.views.MyRecyclerView
android:id="@+id/emojis_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:padding="@dimen/small_margin" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/emoji_palette_bottom_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:gravity="center_vertical">
<TextView
android:id="@+id/emoji_palette_mode_change"
android:layout_width="@dimen/emoji_palette_btn_size"
android:layout_height="@dimen/emoji_palette_btn_size"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/medium_margin"
android:background="@drawable/keyboard_key_selector"
android:gravity="center"
android:text="@string/abc" />
<ImageButton
android:id="@+id/emoji_palette_backspace"
android:layout_width="@dimen/emoji_palette_btn_size"
android:layout_height="@dimen/emoji_palette_btn_size"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/medium_margin"
android:background="@drawable/keyboard_key_selector"
android:contentDescription="@string/delete"
android:src="@drawable/ic_clear_vector" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/clipboard_manager_holder"
android:layout_width="match_parent"

View File

@ -31,6 +31,8 @@
<string name="show_popup">إظهار نافذة منبثقة عند الضغط على المفاتيح</string>
<string name="vibrate_on_keypress">يهتز عند ضغط الزر</string>
<string name="keyboard_language">لغة لوحة المفاتيح</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Show a popup on keypress</string>
<string name="vibrate_on_keypress">Vibrate on keypress</string>
<string name="keyboard_language">Keyboard language</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Show a popup on keypress</string>
<string name="vibrate_on_keypress">Vibrate on keypress</string>
<string name="keyboard_language">Keyboard language</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Показване на изскачащ прозорец при натискане на клавиш</string>
<string name="vibrate_on_keypress">Вибриране при натискане на клавиш</string>
<string name="keyboard_language">Език на клавиатурата</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Mostra una finestra emergent en prémer les tecles</string>
<string name="vibrate_on_keypress">Vibra en prémer les tecles</string>
<string name="keyboard_language">Idioma del teclat</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Zobrazit vyskakovací okno při stisknutí klávesy</string>
<string name="vibrate_on_keypress">Vibrovat při stisknutí klávesy</string>
<string name="keyboard_language">Jazyk klávesnice</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Vis en popup ved tastetryk</string>
<string name="vibrate_on_keypress">Vibrér ved tastetryk</string>
<string name="keyboard_language">Tastatursprog</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Ein Popup bei Tastendruck anzeigen</string>
<string name="vibrate_on_keypress">Bei Tastendruck vibrieren</string>
<string name="keyboard_language">Tastatursprache</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Εμφάνιση ανάδυσης στο πάτημα πλήκτρων</string>
<string name="vibrate_on_keypress">Δόνηση στο πάτημα πλήκτρου</string>
<string name="keyboard_language">Γλώσσα πληκτρολογίου</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Show a popup on keypress</string>
<string name="vibrate_on_keypress">Vibrate on keypress</string>
<string name="keyboard_language">Keyboard language</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Agrandar la tecla al pulsarla</string>
<string name="vibrate_on_keypress">Vibrar al pulsar una tecla</string>
<string name="keyboard_language">Idioma del teclado</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Klahvivajutusel näita hüpikakent</string>
<string name="vibrate_on_keypress">Klahvivajutusel kasuta värinat</string>
<string name="keyboard_language">Klavituuri keel</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Show a popup on keypress</string>
<string name="vibrate_on_keypress">Vibrate on keypress</string>
<string name="keyboard_language">Keyboard language</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Afficher une fenêtre contextuelle en cas de pression sur une touche</string>
<string name="vibrate_on_keypress">Vibrer lorsqu\'une touche est pressée</string>
<string name="keyboard_language">Langue du clavier</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Show a popup on keypress</string>
<string name="vibrate_on_keypress">Vibrate on keypress</string>
<string name="keyboard_language">Keyboard language</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Prikaži skočni prozor prilikom pritiskanja tipke</string>
<string name="vibrate_on_keypress">Vibriraj prilikom pritiskanja tipke</string>
<string name="keyboard_language">Jezik tipkovnice</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Show a popup on keypress</string>
<string name="vibrate_on_keypress">Vibrate on keypress</string>
<string name="keyboard_language">Keyboard language</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Tampilkan sebuah popup pada penekanan tombol</string>
<string name="vibrate_on_keypress">Getar pada penekanan tombol</string>
<string name="keyboard_language">Bahasa keyboard</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Mostra un popup alla pressione di un tasto</string>
<string name="vibrate_on_keypress">Vibra premendo un tasto</string>
<string name="keyboard_language">Lingua della tastiera</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">הצג חלון קופץ בלחיצת מקש</string>
<string name="vibrate_on_keypress">רטט בלחיצה על המקש</string>
<string name="keyboard_language">שפת מקלדת</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">キー入力時にポップアップを表示する</string>
<string name="vibrate_on_keypress">キー入力時にバイブする</string>
<string name="keyboard_language">キーボードの言語</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Show a popup on keypress</string>
<string name="vibrate_on_keypress">Vibrate on keypress</string>
<string name="keyboard_language">Keyboard language</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Show a popup on keypress</string>
<string name="vibrate_on_keypress">Vibrate on keypress</string>
<string name="keyboard_language">Keyboard language</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Pop-up tonen bij toetsaanslagen</string>
<string name="vibrate_on_keypress">Trillen bij toetsaanslagen</string>
<string name="keyboard_language">Toetsenbordtaal</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Pokazuj wyskakujące okienko przy naciśnięciu klawisza</string>
<string name="vibrate_on_keypress">Wibracja przy naciśnięciu klawisza</string>
<string name="keyboard_language">Język klawiatury</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Mostrar pop-up ao digitar</string>
<string name="vibrate_on_keypress">Vibrar ao digitar</string>
<string name="keyboard_language">Idioma do teclado</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Mostrar notificação pop-up ao premir tecla</string>
<string name="vibrate_on_keypress">Vibrar ao premir tecla</string>
<string name="keyboard_language">Keyboard language</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Afișați o fereastră pop-up la apăsarea unei taste</string>
<string name="vibrate_on_keypress">Vibrează la apăsarea tastelor</string>
<string name="keyboard_language">Limba tastaturii</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Показ ввода по нажатию</string>
<string name="vibrate_on_keypress">Вибрация по нажатию</string>
<string name="keyboard_language">Язык клавиатуры</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Zobraziť detail znaku pri stlačení</string>
<string name="vibrate_on_keypress">Vibrovať pri stlačení</string>
<string name="keyboard_language">Jazyk klávesnice</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Visa en popupp vid knapptryck</string>
<string name="vibrate_on_keypress">Vibrera på knapptryck</string>
<string name="keyboard_language">Tangentbordsspråk</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Show a popup on keypress</string>
<string name="vibrate_on_keypress">Vibrate on keypress</string>
<string name="keyboard_language">Keyboard language</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Tuşa basıldığında bir açılır menü göster</string>
<string name="vibrate_on_keypress">Tuşa basıldığında titret</string>
<string name="keyboard_language">Klavye dili</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">Показувати popup при натисканні</string>
<string name="vibrate_on_keypress">Вібрувати при натисканні</string>
<string name="keyboard_language">Мова клавіатури</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -31,6 +31,8 @@
<string name="show_popup">按键时显示弹框</string>
<string name="vibrate_on_keypress">按键时振动</string>
<string name="keyboard_language">键盘语言</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -32,6 +32,8 @@
<string name="show_popup">按下按鍵時顯示彈出效果</string>
<string name="vibrate_on_keypress">按下按鍵時震動</string>
<string name="keyboard_language">鍵盤語言</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -8,8 +8,12 @@
<dimen name="key_height">60dp</dimen>
<dimen name="vertical_correction">-10dp</dimen>
<dimen name="clip_pin_size">28dp</dimen>
<dimen name="emoji_item_size">46dp</dimen>
<dimen name="emoji_top_bar_elevation">4dp</dimen>
<dimen name="emoji_palette_btn_size">42dp</dimen>
<dimen name="keyboard_text_size">22sp</dimen>
<dimen name="preview_text_size">26sp</dimen>
<dimen name="label_text_size">16sp</dimen> <!-- text size used at keys with longer labels, like "123" -->
<dimen name="emoji_text_size">28sp</dimen>
</resources>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="abc">ABC</string>
</resources>

View File

@ -31,6 +31,8 @@
<string name="show_popup">Show a popup on keypress</string>
<string name="vibrate_on_keypress">Vibrate on keypress</string>
<string name="keyboard_language">Keyboard language</string>
<!-- Emojis -->
<string name="emojis">Emojis</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res

View File

@ -122,10 +122,15 @@
<Key
app:keyLabel="q"
app:keyWidth="10%p" />
<Key
app:code="-6"
app:keyEdgeFlags="left"
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
app:keyWidth="8%p" />
<Key
app:code="32"
app:isRepeatable="true"
app:keyWidth="50%p" />
app:keyWidth="40%p" />
<Key
app:keyLabel="z"
app:keyWidth="10%p"

View File

@ -121,10 +121,15 @@
<Key
app:keyLabel=","
app:keyWidth="10%p" />
<Key
app:code="-6"
app:keyEdgeFlags="left"
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
app:keyWidth="8%p" />
<Key
app:code="32"
app:isRepeatable="true"
app:keyWidth="50%p" />
app:keyWidth="40%p" />
<Key
app:keyLabel="."
app:keyWidth="10%p" />

View File

@ -121,10 +121,15 @@
<Key
app:keyLabel=","
app:keyWidth="10%p" />
<Key
app:code="-6"
app:keyEdgeFlags="left"
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
app:keyWidth="8%p" />
<Key
app:code="32"
app:isRepeatable="true"
app:keyWidth="50%p" />
app:keyWidth="40%p" />
<Key
app:keyLabel="."
app:keyWidth="10%p" />

View File

@ -102,10 +102,15 @@
<Key
app:keyLabel=","
app:keyWidth="10%p" />
<Key
app:code="-6"
app:keyEdgeFlags="left"
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
app:keyWidth="8%p" />
<Key
app:code="32"
app:isRepeatable="true"
app:keyWidth="50%p" />
app:keyWidth="40%p" />
<Key
app:keyLabel="."
app:keyWidth="10%p" />

View File

@ -121,10 +121,15 @@
<Key
app:keyLabel=","
app:keyWidth="10%p" />
<Key
app:code="-6"
app:keyEdgeFlags="left"
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
app:keyWidth="8%p" />
<Key
app:code="32"
app:isRepeatable="true"
app:keyWidth="50%p" />
app:keyWidth="40%p" />
<Key
app:keyLabel="."
app:keyWidth="10%p" />

View File

@ -105,10 +105,15 @@
<Key
app:keyLabel=","
app:keyWidth="10%p" />
<Key
app:code="-6"
app:keyEdgeFlags="left"
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
app:keyWidth="8%p" />
<Key
app:code="32"
app:isRepeatable="true"
app:keyWidth="50%p" />
app:keyWidth="40%p" />
<Key
app:keyLabel="."
app:keyWidth="10%p" />

View File

@ -155,10 +155,15 @@
<Key
app:keyLabel=","
app:keyWidth="10%p" />
<Key
app:code="-6"
app:keyEdgeFlags="left"
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
app:keyWidth="8%p" />
<Key
app:code="32"
app:isRepeatable="true"
app:keyWidth="50%p" />
app:keyWidth="40%p" />
<Key
app:keyLabel="."
app:keyWidth="10%p" />

View File

@ -108,10 +108,15 @@
<Key
app:keyLabel=","
app:keyWidth="10%p" />
<Key
app:code="-6"
app:keyEdgeFlags="left"
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
app:keyWidth="8%p" />
<Key
app:code="32"
app:isRepeatable="true"
app:keyWidth="50%p" />
app:keyWidth="40%p" />
<Key
app:keyLabel="."
app:keyWidth="10%p" />

View File

@ -119,10 +119,15 @@
<Key
app:keyLabel=","
app:keyWidth="10%p" />
<Key
app:code="-6"
app:keyEdgeFlags="left"
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
app:keyWidth="8%p" />
<Key
app:code="32"
app:isRepeatable="true"
app:keyWidth="50%p"/>
app:keyWidth="40%p" />
<Key
app:keyLabel="."
app:keyWidth="10%p" />