Skip to content

Commit

Permalink
Merge pull request #33 from margual56/spanish-qwerty
Browse files Browse the repository at this point in the history
Added Spanish QWERTY layout
  • Loading branch information
tibbi committed Apr 2, 2022
2 parents 9c72154 + 97807c9 commit d8536a0
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.simplemobiletools.keyboard.helpers.LANGUAGE_ENGLISH_QWERTY
import com.simplemobiletools.keyboard.helpers.LANGUAGE_ENGLISH_QWERTZ
import com.simplemobiletools.keyboard.helpers.LANGUAGE_FRENCH
import com.simplemobiletools.keyboard.helpers.LANGUAGE_RUSSIAN
import com.simplemobiletools.keyboard.helpers.LANGUAGE_SPANISH
import kotlinx.android.synthetic.main.activity_settings.*
import java.util.*
import kotlin.system.exitProcess
Expand Down Expand Up @@ -116,6 +117,7 @@ class SettingsActivity : SimpleActivity() {
RadioItem(LANGUAGE_ENGLISH_QWERTY, getKeyboardLanguageText(LANGUAGE_ENGLISH_QWERTY)),
RadioItem(LANGUAGE_ENGLISH_QWERTZ, getKeyboardLanguageText(LANGUAGE_ENGLISH_QWERTZ)),
RadioItem(LANGUAGE_FRENCH, getKeyboardLanguageText(LANGUAGE_FRENCH)),
RadioItem(LANGUAGE_SPANISH, getKeyboardLanguageText(LANGUAGE_SPANISH)),
RadioItem(LANGUAGE_RUSSIAN, getKeyboardLanguageText(LANGUAGE_RUSSIAN))
)

Expand All @@ -131,6 +133,7 @@ class SettingsActivity : SimpleActivity() {
LANGUAGE_FRENCH -> getString(R.string.translation_french)
LANGUAGE_RUSSIAN -> getString(R.string.translation_russian)
LANGUAGE_ENGLISH_QWERTZ -> "${getString(R.string.translation_english)} (QWERTZ)"
LANGUAGE_SPANISH -> getString(R.string.translation_spanish)
else -> "${getString(R.string.translation_english)} (QWERTY)"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ const val LANGUAGE_ENGLISH_QWERTY = 0
const val LANGUAGE_RUSSIAN = 1
const val LANGUAGE_FRENCH = 2
const val LANGUAGE_ENGLISH_QWERTZ = 3
const val LANGUAGE_SPANISH = 4
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
LANGUAGE_FRENCH -> R.xml.keys_letters_french
LANGUAGE_RUSSIAN -> R.xml.keys_letters_russian
LANGUAGE_ENGLISH_QWERTZ -> R.xml.keys_letters_english_qwertz
LANGUAGE_SPANISH -> R.xml.keys_letters_spanish_qwerty
else -> R.xml.keys_letters_english_qwerty
}
}
Expand Down
136 changes: 136 additions & 0 deletions app/src/main/res/xml/keys_letters_spanish_qwerty.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
<Row>
<Key
app:keyEdgeFlags="left"
app:keyLabel="q"
app:popupCharacters="1"
app:popupKeyboard="@xml/keyboard_popup_template"
app:topSmallNumber="1"/>
<Key
app:keyLabel="w"
app:popupCharacters="2"
app:popupKeyboard="@xml/keyboard_popup_template"
app:topSmallNumber="2"/>
<Key
app:keyLabel="e"
app:popupCharacters="êè3éëēęė"
app:popupKeyboard="@xml/keyboard_popup_template"
app:topSmallNumber="3"/>
<Key
app:keyLabel="r"
app:popupCharacters=""
app:popupKeyboard="@xml/keyboard_popup_template"
app:topSmallNumber="4"/>
<Key
app:keyLabel="t"
app:popupCharacters="5"
app:popupKeyboard="@xml/keyboard_popup_template"
app:topSmallNumber="5"/>
<Key
app:keyLabel="y"
app:popupCharacters="ÿ6ý¥"
app:popupKeyboard="@xml/keyboard_popup_template"
app:topSmallNumber="6"/>
<Key
app:keyLabel="u"
app:popupCharacters="ūûü7úùű"
app:popupKeyboard="@xml/keyboard_popup_template"
app:topSmallNumber="7"/>
<Key
app:keyLabel="i"
app:popupCharacters="ïīì8íî"
app:popupKeyboard="@xml/keyboard_popup_template"
app:topSmallNumber="8"/>
<Key
app:keyLabel="o"
app:popupCharacters="őõōöôò9ó"
app:popupKeyboard="@xml/keyboard_popup_template"
app:topSmallNumber="9"/>
<Key
app:keyEdgeFlags="right"
app:keyLabel="p"
app:popupCharacters="0"
app:popupKeyboard="@xml/keyboard_popup_template"
app:topSmallNumber="0"/>
</Row>
<Row>
<Key
app:horizontalGap="5%"
app:keyEdgeFlags="left"
app:keyLabel="a"
app:popupCharacters="áäàâãåāæą"
app:popupKeyboard="@xml/keyboard_popup_template"/>
<Key
app:keyLabel="s"
app:popupCharacters="śßš"
app:popupKeyboard="@xml/keyboard_popup_template"/>
<Key
app:keyLabel="d"
app:popupCharacters="ďđ"
app:popupKeyboard="@xml/keyboard_popup_template"/>
<Key app:keyLabel="f"/>
<Key app:keyLabel="g"/>
<Key app:keyLabel="h"/>
<Key app:keyLabel="j"/>
<Key app:keyLabel="k"/>
<Key
app:keyLabel="l"
app:popupCharacters="ĺľł"
app:popupKeyboard="@xml/keyboard_popup_template"/>
<Key
app:keyEdgeFlags="right"
app:keyLabel="ñ"/>
</Row>
<Row>
<Key
app:code="-1"
app:keyEdgeFlags="left"
app:keyIcon="@drawable/ic_caps_outline_vector"
app:keyWidth="15%p"/>
<Key
app:keyLabel="z"
app:popupCharacters="źžż"
app:popupKeyboard="@xml/keyboard_popup_template"/>
<Key app:keyLabel="x"/>
<Key
app:keyLabel="c"
app:popupCharacters="čçć"
app:popupKeyboard="@xml/keyboard_popup_template"/>
<Key app:keyLabel="v"/>
<Key app:keyLabel="b"/>
<Key
app:keyLabel="n"
app:popupCharacters="ňń"
app:popupKeyboard="@xml/keyboard_popup_template"/>
<Key app:keyLabel="m"/>
<Key
app:code="-5"
app:isRepeatable="true"
app:keyEdgeFlags="right"
app:keyIcon="@drawable/ic_clear_vector"
app:keyWidth="15%p"/>
</Row>
<Row>
<Key
app:code="-2"
app:keyEdgeFlags="left"
app:keyLabel="123"
app:keyWidth="15%p"/>
<Key
app:keyLabel=","
app:keyWidth="10%p"/>
<Key
app:code="32"
app:isRepeatable="true"
app:keyWidth="50%p"/>
<Key
app:keyLabel="."
app:keyWidth="10%p"/>
<Key
app:code="-4"
app:keyEdgeFlags="right"
app:keyIcon="@drawable/ic_enter_vector"
app:keyWidth="15%p"/>
</Row>
</Keyboard>

0 comments on commit d8536a0

Please sign in to comment.