Add keyHintIcon attribute to BaseKeyboard.Key class
This keyHintIcon attribute is used to specify hint icon drawable at top right corner of Key. Change-Id: Icaa91e63c4473b2513396bd3fbeb8ed6fd73586c
BIN
java/res/drawable-mdpi/keyboard_hint_at.9.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
java/res/drawable-mdpi/keyboard_hint_colon.9.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
java/res/drawable-mdpi/keyboard_hint_doublecross.9.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
java/res/drawable-mdpi/keyboard_hint_exclamation.9.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
java/res/drawable-mdpi/keyboard_hint_greater.9.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
java/res/drawable-mdpi/keyboard_hint_plus.9.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
java/res/drawable-mdpi/keyboard_hint_question.9.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
java/res/drawable-mdpi/keyboard_hint_quote.9.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
java/res/drawable-mdpi/keyboard_hint_smaller.9.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
java/res/drawable-mdpi/keyboard_hint_star.9.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
|
@ -106,8 +106,12 @@
|
|||
<attr name="keyOutputText" format="string" />
|
||||
<!-- The label to display on the key. -->
|
||||
<attr name="keyLabel" format="string" />
|
||||
<!-- The label to display on the key when keyboard is in temporary shift mode. -->
|
||||
<attr name="temporaryShiftKeyLabel" format="string" />
|
||||
<!-- The icon to display on the key instead of the label. -->
|
||||
<attr name="keyIcon" format="reference" />
|
||||
<!-- The hint icon to display on the key in conjunction with the label -->
|
||||
<attr name="keyHintIcon" format="reference" />
|
||||
<!-- Mode of the keyboard. If the mode doesn't match the
|
||||
requested keyboard mode, the key will be skipped. -->
|
||||
<attr name="keyboardMode" />
|
||||
|
|
|
@ -212,6 +212,8 @@
|
|||
<string name="label_alpha_key">ABC</string>
|
||||
<!-- Label for ALT modifier key. Must be short to fit on key! -->
|
||||
<string name="label_alt_key">ALT</string>
|
||||
<!-- Label for Shift modifier key of symbol keyboard. Must be short to fit on key! -->
|
||||
<string name="label_more_key">More</string>
|
||||
|
||||
<!-- Voice related labels -->
|
||||
|
||||
|
|
|
@ -34,44 +34,54 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_q"
|
||||
latin:keyWidth="8.75%p"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="w"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_w" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="y"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_y" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p" />
|
||||
<Key
|
||||
|
|
|
@ -34,44 +34,54 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_q"
|
||||
latin:keyWidth="8.75%p"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="w"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_w" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="y"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_y" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p" />
|
||||
<Key
|
||||
|
|
|
@ -28,43 +28,53 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_q"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="w"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_w" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="z"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_z" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p"
|
||||
latin:keyEdgeFlags="right" />
|
||||
|
|
|
@ -28,43 +28,53 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_q"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="w"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_w" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="z"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_z" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p"
|
||||
latin:keyEdgeFlags="right" />
|
||||
|
|
|
@ -28,43 +28,53 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="a"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_a"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="z"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_z" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="y"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_y" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p"
|
||||
latin:keyEdgeFlags="right" />
|
||||
|
|
|
@ -28,43 +28,53 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="a"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_a"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="z"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_z" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="y"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_y" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p"
|
||||
latin:keyEdgeFlags="right" />
|
||||
|
|
|
@ -34,44 +34,54 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_q"
|
||||
latin:keyWidth="8.75%p"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="w"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_w" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="y"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_y" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p" />
|
||||
<Key
|
||||
|
|
|
@ -34,44 +34,54 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_q"
|
||||
latin:keyWidth="8.75%p"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="w"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_w" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="y"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_y" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p" />
|
||||
<Key
|
||||
|
|
|
@ -28,44 +28,54 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="й"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="1"
|
||||
latin:keyWidth="8.75%p"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="ц"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="2" />
|
||||
<Key
|
||||
latin:keyLabel="у"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="3" />
|
||||
<Key
|
||||
latin:keyLabel="к"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="4" />
|
||||
<Key
|
||||
latin:keyLabel="е"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_cyrillic_e" />
|
||||
<Key
|
||||
latin:keyLabel="н"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="6" />
|
||||
<Key
|
||||
latin:keyLabel="г"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="7" />
|
||||
<Key
|
||||
latin:keyLabel="ш"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="8" />
|
||||
<Key
|
||||
latin:keyLabel="щ"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="9" />
|
||||
<Key
|
||||
latin:keyLabel="з"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="0" />
|
||||
<Key
|
||||
|
|
|
@ -28,44 +28,54 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="й"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="1"
|
||||
latin:keyWidth="8.75%p"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="ц"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="2" />
|
||||
<Key
|
||||
latin:keyLabel="у"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="3" />
|
||||
<Key
|
||||
latin:keyLabel="к"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="4" />
|
||||
<Key
|
||||
latin:keyLabel="е"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_cyrillic_e" />
|
||||
<Key
|
||||
latin:keyLabel="н"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="6" />
|
||||
<Key
|
||||
latin:keyLabel="г"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="7" />
|
||||
<Key
|
||||
latin:keyLabel="ш"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="8" />
|
||||
<Key
|
||||
latin:keyLabel="щ"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="9" />
|
||||
<Key
|
||||
latin:keyLabel="з"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="0" />
|
||||
<Key
|
||||
|
|
|
@ -29,43 +29,53 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="љ"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="1"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="њ"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="2" />
|
||||
<Key
|
||||
latin:keyLabel="е"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="3" />
|
||||
<Key
|
||||
latin:keyLabel="р"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="4" />
|
||||
<Key
|
||||
latin:keyLabel="т"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="5" />
|
||||
<Key
|
||||
latin:keyLabel="з"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="6" />
|
||||
<Key
|
||||
latin:keyLabel="у"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="7" />
|
||||
<Key
|
||||
latin:keyLabel="и"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="8" />
|
||||
<Key
|
||||
latin:keyLabel="о"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="9" />
|
||||
<Key
|
||||
latin:keyLabel="п"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="0" />
|
||||
<Key
|
||||
|
|
|
@ -29,43 +29,53 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="љ"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="1"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="њ"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="2" />
|
||||
<Key
|
||||
latin:keyLabel="е"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="3" />
|
||||
<Key
|
||||
latin:keyLabel="р"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="4" />
|
||||
<Key
|
||||
latin:keyLabel="т"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="5" />
|
||||
<Key
|
||||
latin:keyLabel="з"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="6" />
|
||||
<Key
|
||||
latin:keyLabel="у"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="7" />
|
||||
<Key
|
||||
latin:keyLabel="и"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="8" />
|
||||
<Key
|
||||
latin:keyLabel="о"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="9" />
|
||||
<Key
|
||||
latin:keyLabel="п"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="0" />
|
||||
<Key
|
||||
|
|
|
@ -36,44 +36,54 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_q"
|
||||
latin:keyWidth="8.75%p"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="w"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_w" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="y"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_y" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p" />
|
||||
<Key
|
||||
|
|
|
@ -36,44 +36,54 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_q"
|
||||
latin:keyWidth="8.75%p"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="w"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_w" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="y"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_y" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p" />
|
||||
<Key
|
||||
|
|
|
@ -30,49 +30,62 @@
|
|||
<Key
|
||||
latin:codes="@integer/key_tab"
|
||||
latin:keyLabel="Tab"
|
||||
latin:isModifier="true"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_q" />
|
||||
<Key
|
||||
latin:keyLabel="w"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_w" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="y"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_y" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p" />
|
||||
<Key
|
||||
latin:keyLabel="="
|
||||
latin:temporaryShiftKeyLabel="+"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_plus"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="+" />
|
||||
<Key
|
||||
|
@ -121,10 +134,14 @@
|
|||
latin:popupCharacters="@string/alternates_for_l" />
|
||||
<Key
|
||||
latin:keyLabel=";"
|
||||
latin:temporaryShiftKeyLabel=":"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_colon"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters=":" />
|
||||
<Key
|
||||
latin:keyLabel="\'"
|
||||
latin:temporaryShiftKeyLabel="""
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_quote"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters=""" />
|
||||
<Key
|
||||
|
@ -168,14 +185,20 @@
|
|||
latin:keyLabel="m" />
|
||||
<Key
|
||||
latin:keyLabel=","
|
||||
latin:temporaryShiftKeyLabel="*"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_star"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="*" />
|
||||
<Key
|
||||
latin:keyLabel="."
|
||||
latin:temporaryShiftKeyLabel="!"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_exclamation"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="!" />
|
||||
<Key
|
||||
latin:keyLabel="/"
|
||||
latin:temporaryShiftKeyLabel="\?"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_question"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="\?" />
|
||||
<Key
|
||||
|
@ -191,11 +214,15 @@
|
|||
<!-- This row is intentionally not marked as a bottom row -->
|
||||
<Key
|
||||
latin:keyLabel="("
|
||||
latin:temporaryShiftKeyLabel="<"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_smaller"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="<"
|
||||
latin:horizontalGap="16.25%p" />
|
||||
<Key
|
||||
latin:keyLabel=")"
|
||||
latin:temporaryShiftKeyLabel=">"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_greater"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters=">" />
|
||||
<Key
|
||||
|
@ -206,10 +233,14 @@
|
|||
latin:isModifier="true" />
|
||||
<Key
|
||||
latin:keyLabel="_"
|
||||
latin:temporaryShiftKeyLabel="\@"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_at"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="\@" />
|
||||
<Key
|
||||
latin:keyLabel="-"
|
||||
latin:temporaryShiftKeyLabel="#"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_doublecross"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="#" />
|
||||
</Row>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<Key
|
||||
latin:codes="@integer/key_tab"
|
||||
latin:keyLabel="Tab"
|
||||
latin:isModifier="true"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="1" />
|
||||
|
@ -102,7 +103,7 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:codes="@integer/key_shift"
|
||||
latin:keyIcon="@drawable/sym_keyboard_shift"
|
||||
latin:keyLabel="@string/label_more_key"
|
||||
latin:iconPreview="@drawable/sym_keyboard_feedback_shift"
|
||||
latin:keyWidth="12.5%p"
|
||||
latin:isModifier="true"
|
||||
|
@ -130,7 +131,7 @@
|
|||
latin:keyLabel="\?" />
|
||||
<Key
|
||||
latin:codes="@integer/key_shift"
|
||||
latin:keyIcon="@drawable/sym_keyboard_shift"
|
||||
latin:keyLabel="@string/label_more_key"
|
||||
latin:iconPreview="@drawable/sym_keyboard_feedback_shift"
|
||||
latin:keyWidth="12.5%p"
|
||||
latin:isModifier="true"
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<Key
|
||||
latin:codes="@integer/key_tab"
|
||||
latin:keyLabel="Tab"
|
||||
latin:isModifier="true"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="∞" />
|
||||
|
@ -102,7 +103,7 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:codes="@integer/key_shift"
|
||||
latin:keyIcon="@drawable/sym_keyboard_shift"
|
||||
latin:keyLabel="@string/label_more_key"
|
||||
latin:iconPreview="@drawable/sym_keyboard_feedback_shift"
|
||||
latin:keyWidth="12.5%p"
|
||||
latin:isModifier="true"
|
||||
|
@ -130,7 +131,7 @@
|
|||
latin:keyLabel="¿" />
|
||||
<Key
|
||||
latin:codes="@integer/key_shift"
|
||||
latin:keyIcon="@drawable/sym_keyboard_shift"
|
||||
latin:keyLabel="@string/label_more_key"
|
||||
latin:iconPreview="@drawable/sym_keyboard_feedback_shift"
|
||||
latin:keyWidth="12.5%p"
|
||||
latin:isModifier="true"
|
||||
|
|
|
@ -28,43 +28,53 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_q"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="w"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_w" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="y"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_y" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p"
|
||||
latin:keyEdgeFlags="right" />
|
||||
|
|
|
@ -28,43 +28,53 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_1"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_q"
|
||||
latin:keyEdgeFlags="left" />
|
||||
<Key
|
||||
latin:keyLabel="w"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_2"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_w" />
|
||||
<Key
|
||||
latin:keyLabel="e"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_3"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_e" />
|
||||
<Key
|
||||
latin:keyLabel="r"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_4"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_r" />
|
||||
<Key
|
||||
latin:keyLabel="t"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_5"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_t" />
|
||||
<Key
|
||||
latin:keyLabel="y"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_6"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_y" />
|
||||
<Key
|
||||
latin:keyLabel="u"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_7"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_u" />
|
||||
<Key
|
||||
latin:keyLabel="i"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_8"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_i" />
|
||||
<Key
|
||||
latin:keyLabel="o"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_9"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_o" />
|
||||
<Key
|
||||
latin:keyLabel="p"
|
||||
latin:keyHintIcon="@drawable/keyboard_hint_0"
|
||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||
latin:popupCharacters="@string/alternates_for_p"
|
||||
latin:keyEdgeFlags="right" />
|
||||
|
|
|
@ -194,9 +194,13 @@ public class BaseKeyboard {
|
|||
|
||||
/** Label to display */
|
||||
public CharSequence label;
|
||||
/** Label to display when keyboard is in temporary shift mode */
|
||||
public CharSequence temporaryShiftLabel;
|
||||
|
||||
/** Icon to display instead of a label. Icon takes precedence over a label */
|
||||
public Drawable icon;
|
||||
/** Hint icon to display on the key in conjunction with the label */
|
||||
public Drawable hintIcon;
|
||||
/** Preview version of the icon, for the preview popup */
|
||||
public Drawable iconPreview;
|
||||
/** Width of the key, not including the gap */
|
||||
|
@ -294,22 +298,17 @@ public class BaseKeyboard {
|
|||
TypedArray a = res.obtainAttributes(Xml.asAttributeSet(parser),
|
||||
R.styleable.BaseKeyboard);
|
||||
|
||||
width = getDimensionOrFraction(a,
|
||||
R.styleable.BaseKeyboard_keyWidth,
|
||||
width = getDimensionOrFraction(a, R.styleable.BaseKeyboard_keyWidth,
|
||||
keyboard.mDisplayWidth, parent.defaultWidth);
|
||||
height = getDimensionOrFraction(a,
|
||||
R.styleable.BaseKeyboard_keyHeight,
|
||||
height = getDimensionOrFraction(a, R.styleable.BaseKeyboard_keyHeight,
|
||||
keyboard.mDisplayHeight, parent.defaultHeight);
|
||||
gap = getDimensionOrFraction(a,
|
||||
R.styleable.BaseKeyboard_horizontalGap,
|
||||
gap = getDimensionOrFraction(a, R.styleable.BaseKeyboard_horizontalGap,
|
||||
keyboard.mDisplayWidth, parent.defaultHorizontalGap);
|
||||
a.recycle();
|
||||
a = res.obtainAttributes(Xml.asAttributeSet(parser),
|
||||
R.styleable.BaseKeyboard_Key);
|
||||
a = res.obtainAttributes(Xml.asAttributeSet(parser), R.styleable.BaseKeyboard_Key);
|
||||
this.x += gap;
|
||||
TypedValue codesValue = new TypedValue();
|
||||
a.getValue(R.styleable.BaseKeyboard_Key_codes,
|
||||
codesValue);
|
||||
a.getValue(R.styleable.BaseKeyboard_Key_codes, codesValue);
|
||||
if (codesValue.type == TypedValue.TYPE_INT_DEC
|
||||
|| codesValue.type == TypedValue.TYPE_INT_HEX) {
|
||||
codes = new int[] { codesValue.data };
|
||||
|
@ -318,29 +317,22 @@ public class BaseKeyboard {
|
|||
}
|
||||
|
||||
iconPreview = a.getDrawable(R.styleable.BaseKeyboard_Key_iconPreview);
|
||||
if (iconPreview != null) {
|
||||
iconPreview.setBounds(0, 0, iconPreview.getIntrinsicWidth(),
|
||||
iconPreview.getIntrinsicHeight());
|
||||
}
|
||||
popupCharacters = a.getText(
|
||||
R.styleable.BaseKeyboard_Key_popupCharacters);
|
||||
popupResId = a.getResourceId(
|
||||
R.styleable.BaseKeyboard_Key_popupKeyboard, 0);
|
||||
repeatable = a.getBoolean(
|
||||
R.styleable.BaseKeyboard_Key_isRepeatable, false);
|
||||
modifier = a.getBoolean(
|
||||
R.styleable.BaseKeyboard_Key_isModifier, false);
|
||||
sticky = a.getBoolean(
|
||||
R.styleable.BaseKeyboard_Key_isSticky, false);
|
||||
setDefaultBounds(iconPreview);
|
||||
popupCharacters = a.getText(R.styleable.BaseKeyboard_Key_popupCharacters);
|
||||
popupResId = a.getResourceId(R.styleable.BaseKeyboard_Key_popupKeyboard, 0);
|
||||
repeatable = a.getBoolean(R.styleable.BaseKeyboard_Key_isRepeatable, false);
|
||||
modifier = a.getBoolean(R.styleable.BaseKeyboard_Key_isModifier, false);
|
||||
sticky = a.getBoolean(R.styleable.BaseKeyboard_Key_isSticky, false);
|
||||
edgeFlags = a.getInt(R.styleable.BaseKeyboard_Key_keyEdgeFlags, 0);
|
||||
edgeFlags |= parent.rowEdgeFlags;
|
||||
|
||||
icon = a.getDrawable(
|
||||
R.styleable.BaseKeyboard_Key_keyIcon);
|
||||
if (icon != null) {
|
||||
icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight());
|
||||
}
|
||||
icon = a.getDrawable(R.styleable.BaseKeyboard_Key_keyIcon);
|
||||
setDefaultBounds(icon);
|
||||
hintIcon = a.getDrawable(R.styleable.BaseKeyboard_Key_keyHintIcon);
|
||||
setDefaultBounds(hintIcon);
|
||||
|
||||
label = a.getText(R.styleable.BaseKeyboard_Key_keyLabel);
|
||||
temporaryShiftLabel = a.getText(R.styleable.BaseKeyboard_Key_temporaryShiftKeyLabel);
|
||||
text = a.getText(R.styleable.BaseKeyboard_Key_keyOutputText);
|
||||
|
||||
if (codes == null && !TextUtils.isEmpty(label)) {
|
||||
|
@ -679,10 +671,12 @@ public class BaseKeyboard {
|
|||
return new int[0];
|
||||
}
|
||||
|
||||
// TODO should be private
|
||||
protected Row createRowFromXml(Resources res, XmlResourceParser parser) {
|
||||
return new Row(res, this, parser);
|
||||
}
|
||||
|
||||
// TODO should be private
|
||||
protected Key createKeyFromXml(Resources res, Row parent, int x, int y,
|
||||
XmlResourceParser parser) {
|
||||
return new Key(res, parent, x, y, parser);
|
||||
|
@ -707,6 +701,7 @@ public class BaseKeyboard {
|
|||
if (TAG_ROW.equals(tag)) {
|
||||
inRow = true;
|
||||
x = 0;
|
||||
// TODO createRowFromXml should not be called from BaseKeyboard constructor.
|
||||
currentRow = createRowFromXml(res, parser);
|
||||
skipRow = currentRow.mode != 0 && currentRow.mode != mKeyboardMode;
|
||||
if (skipRow) {
|
||||
|
@ -715,6 +710,7 @@ public class BaseKeyboard {
|
|||
}
|
||||
} else if (TAG_KEY.equals(tag)) {
|
||||
inKey = true;
|
||||
// TODO createKeyFromXml should not be called from BaseKeyboard constructor.
|
||||
key = createKeyFromXml(res, currentRow, x, y, parser);
|
||||
mKeys.add(key);
|
||||
if (key.codes[0] == KEYCODE_SHIFT) {
|
||||
|
@ -793,4 +789,10 @@ public class BaseKeyboard {
|
|||
}
|
||||
return defValue;
|
||||
}
|
||||
|
||||
protected static void setDefaultBounds(Drawable drawable) {
|
||||
if (drawable != null)
|
||||
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(),
|
||||
drawable.getIntrinsicHeight());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,9 +62,6 @@ public class LatinKeyboard extends BaseKeyboard {
|
|||
private Key mF1Key;
|
||||
private Key mSpaceKey;
|
||||
private Key m123Key;
|
||||
private final int NUMBER_HINT_COUNT = 10;
|
||||
private Key[] mNumberHintKeys;
|
||||
private Drawable[] mNumberHintIcons = new Drawable[NUMBER_HINT_COUNT];
|
||||
private int mSpaceKeyIndex = -1;
|
||||
private int mSpaceDragStartX;
|
||||
private int mSpaceDragLastDiff;
|
||||
|
@ -119,9 +116,7 @@ public class LatinKeyboard extends BaseKeyboard {
|
|||
mRes = res;
|
||||
mShiftLockIcon = res.getDrawable(R.drawable.sym_keyboard_shift_locked);
|
||||
mShiftLockPreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_shift_locked);
|
||||
mShiftLockPreviewIcon.setBounds(0, 0,
|
||||
mShiftLockPreviewIcon.getIntrinsicWidth(),
|
||||
mShiftLockPreviewIcon.getIntrinsicHeight());
|
||||
setDefaultBounds(mShiftLockPreviewIcon);
|
||||
mSpaceIcon = res.getDrawable(R.drawable.sym_keyboard_space);
|
||||
mSpaceAutoCompletionIndicator = res.getDrawable(R.drawable.sym_keyboard_space_led);
|
||||
mSpacePreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_space);
|
||||
|
@ -138,37 +133,11 @@ public class LatinKeyboard extends BaseKeyboard {
|
|||
mIsAlphaKeyboard = xmlLayoutResId == R.xml.kbd_qwerty
|
||||
|| xmlLayoutResId == R.xml.kbd_qwerty_black;
|
||||
mSpaceKeyIndex = indexOf(LatinIME.KEYCODE_SPACE);
|
||||
initializeNumberHintResources(context);
|
||||
}
|
||||
|
||||
private void initializeNumberHintResources(Context context) {
|
||||
final Resources res = context.getResources();
|
||||
mNumberHintIcons[0] = res.getDrawable(R.drawable.keyboard_hint_0);
|
||||
mNumberHintIcons[1] = res.getDrawable(R.drawable.keyboard_hint_1);
|
||||
mNumberHintIcons[2] = res.getDrawable(R.drawable.keyboard_hint_2);
|
||||
mNumberHintIcons[3] = res.getDrawable(R.drawable.keyboard_hint_3);
|
||||
mNumberHintIcons[4] = res.getDrawable(R.drawable.keyboard_hint_4);
|
||||
mNumberHintIcons[5] = res.getDrawable(R.drawable.keyboard_hint_5);
|
||||
mNumberHintIcons[6] = res.getDrawable(R.drawable.keyboard_hint_6);
|
||||
mNumberHintIcons[7] = res.getDrawable(R.drawable.keyboard_hint_7);
|
||||
mNumberHintIcons[8] = res.getDrawable(R.drawable.keyboard_hint_8);
|
||||
mNumberHintIcons[9] = res.getDrawable(R.drawable.keyboard_hint_9);
|
||||
}
|
||||
|
||||
// TODO: delete this method and do initialization in constructor.
|
||||
private void initializeMemberVariablesAsNeeded() {
|
||||
if (mNumberHintKeys == null)
|
||||
mNumberHintKeys = new Key[NUMBER_HINT_COUNT];
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Key createKeyFromXml(Resources res, Row parent, int x, int y,
|
||||
XmlResourceParser parser) {
|
||||
// TODO: This initialization is needed because this protected method is being called from
|
||||
// the base class constructor before this class constructor gets called. We need to fix
|
||||
// this.
|
||||
initializeMemberVariablesAsNeeded();
|
||||
|
||||
Key key = new LatinKey(res, parent, x, y, parser);
|
||||
switch (key.codes[0]) {
|
||||
case LatinIME.KEYCODE_ENTER:
|
||||
|
@ -186,17 +155,6 @@ public class LatinKeyboard extends BaseKeyboard {
|
|||
break;
|
||||
}
|
||||
|
||||
// For number hints on the upper-right corner of key
|
||||
int hintNumber = -1;
|
||||
if (LatinKeyboardBaseView.isNumberAtLeftmostPopupChar(key)) {
|
||||
hintNumber = key.popupCharacters.charAt(0) - '0';
|
||||
} else if (LatinKeyboardBaseView.isNumberAtRightmostPopupChar(key)) {
|
||||
hintNumber = key.popupCharacters.charAt(key.popupCharacters.length() - 1) - '0';
|
||||
}
|
||||
if (hintNumber >= 0 && hintNumber <= 9) {
|
||||
mNumberHintKeys[hintNumber] = key;
|
||||
}
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
|
@ -251,11 +209,7 @@ public class LatinKeyboard extends BaseKeyboard {
|
|||
break;
|
||||
}
|
||||
// Set the initial size of the preview icon
|
||||
if (mEnterKey.iconPreview != null) {
|
||||
mEnterKey.iconPreview.setBounds(0, 0,
|
||||
mEnterKey.iconPreview.getIntrinsicWidth(),
|
||||
mEnterKey.iconPreview.getIntrinsicHeight());
|
||||
}
|
||||
setDefaultBounds(mEnterKey.iconPreview);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -279,7 +233,7 @@ public class LatinKeyboard extends BaseKeyboard {
|
|||
public boolean isShiftLocked() {
|
||||
return mShiftState == SHIFT_LOCKED;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean setShifted(boolean shiftState) {
|
||||
boolean shiftChanged = false;
|
||||
|
@ -314,6 +268,10 @@ public class LatinKeyboard extends BaseKeyboard {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isTemporaryUpperCase() {
|
||||
return mIsAlphaKeyboard && isShifted() && !isShiftLocked();
|
||||
}
|
||||
|
||||
/* package */ boolean isAlphaKeyboard() {
|
||||
return mIsAlphaKeyboard;
|
||||
}
|
||||
|
@ -335,11 +293,6 @@ public class LatinKeyboard extends BaseKeyboard {
|
|||
if (mSpaceKey != null) {
|
||||
updateSpaceBarForLocale(isAutoCompletion, isBlack);
|
||||
}
|
||||
updateNumberHintKeys();
|
||||
}
|
||||
|
||||
private void setDefaultBounds(Drawable drawable) {
|
||||
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
|
||||
}
|
||||
|
||||
public void setVoiceMode(boolean hasVoiceButton, boolean hasVoice) {
|
||||
|
@ -385,14 +338,6 @@ public class LatinKeyboard extends BaseKeyboard {
|
|||
return mSpaceKey;
|
||||
}
|
||||
|
||||
private void updateNumberHintKeys() {
|
||||
for (int i = 0; i < mNumberHintKeys.length; ++i) {
|
||||
if (mNumberHintKeys[i] != null) {
|
||||
mNumberHintKeys[i].icon = mNumberHintIcons[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isLanguageSwitchEnabled() {
|
||||
return mLocale != null;
|
||||
}
|
||||
|
@ -828,8 +773,7 @@ public class LatinKeyboard extends BaseKeyboard {
|
|||
|
||||
public SlidingLocaleDrawable(Drawable background, int width, int height) {
|
||||
mBackground = background;
|
||||
mBackground.setBounds(0, 0,
|
||||
mBackground.getIntrinsicWidth(), mBackground.getIntrinsicHeight());
|
||||
setDefaultBounds(mBackground);
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
mTextPaint = new TextPaint();
|
||||
|
@ -887,7 +831,7 @@ public class LatinKeyboard extends BaseKeyboard {
|
|||
canvas.drawText(mNextLanguage, diff - width / 2, baseline, paint);
|
||||
canvas.drawText(mPrevLanguage, diff + width + width / 2, baseline, paint);
|
||||
|
||||
lArrow.setBounds(0, 0, lArrow.getIntrinsicWidth(), lArrow.getIntrinsicHeight());
|
||||
setDefaultBounds(lArrow);
|
||||
rArrow.setBounds(width - rArrow.getIntrinsicWidth(), 0, width,
|
||||
rArrow.getIntrinsicHeight());
|
||||
lArrow.draw(canvas);
|
||||
|
|
|
@ -578,7 +578,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
|
|||
mKeys = mKeyDetector.setKeyboard(keyboard, -getPaddingLeft(),
|
||||
-getPaddingTop() + mVerticalCorrection);
|
||||
for (PointerTracker tracker : mPointerTrackers) {
|
||||
tracker.setKeyboard(mKeys, mKeyHysteresisDistance);
|
||||
tracker.setKeyboard(keyboard, mKeys, mKeyHysteresisDistance);
|
||||
}
|
||||
requestLayout();
|
||||
// Hint to reallocate the buffer if the size changed
|
||||
|
@ -802,8 +802,19 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
|
|||
canvas.translate(key.x + kbdPaddingLeft, key.y + kbdPaddingTop);
|
||||
keyBackground.draw(canvas);
|
||||
|
||||
boolean shouldDrawIcon = true;
|
||||
boolean drawHintIcon = true;
|
||||
if (label != null) {
|
||||
// If keyboard is multi-touch capable and in temporary upper case state and key has
|
||||
// tempoarary shift label, label should be hint character and hint icon should not
|
||||
// be drawn.
|
||||
if (mHasDistinctMultitouch
|
||||
&& mKeyboard instanceof LatinKeyboard
|
||||
&& ((LatinKeyboard)mKeyboard).isTemporaryUpperCase()
|
||||
&& key.temporaryShiftLabel != null) {
|
||||
label = key.temporaryShiftLabel.toString();
|
||||
drawHintIcon = false;
|
||||
}
|
||||
|
||||
// For characters, use large font. For labels like "Done", use small font.
|
||||
if (label.length() > 1 && key.codes.length < 2) {
|
||||
paint.setTextSize(mLabelTextSize);
|
||||
|
@ -823,25 +834,26 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
|
|||
paint);
|
||||
// Turn off drop shadow
|
||||
paint.setShadowLayer(0, 0, 0, 0);
|
||||
|
||||
// Usually don't draw icon if label is not null, but we draw icon for the number
|
||||
// hint.
|
||||
shouldDrawIcon = isNumberAtEdgeOfPopupChars(key);
|
||||
}
|
||||
if (key.icon != null && shouldDrawIcon) {
|
||||
// Special handing for the upper-right number hint icons
|
||||
final int drawableWidth = isNumberAtEdgeOfPopupChars(key) ?
|
||||
key.width : key.icon.getIntrinsicWidth();
|
||||
final int drawableHeight = isNumberAtEdgeOfPopupChars(key) ?
|
||||
key.height : key.icon.getIntrinsicHeight();
|
||||
Drawable icon = null;
|
||||
if (key.label == null && key.icon != null)
|
||||
icon = key.icon;
|
||||
if (icon == null && key.hintIcon != null && drawHintIcon)
|
||||
icon = key.hintIcon;
|
||||
if (icon != null) {
|
||||
// Hack for key hint icon displaying at the top right corner of the key.
|
||||
final int drawableWidth = icon == key.hintIcon
|
||||
? key.width : icon.getIntrinsicWidth();
|
||||
final int drawableHeight = icon == key.hintIcon
|
||||
? key.height : icon.getIntrinsicHeight();
|
||||
|
||||
final int drawableX = (key.width - padding.left - padding.right
|
||||
- drawableWidth) / 2 + padding.left;
|
||||
final int drawableY = (key.height - padding.top - padding.bottom
|
||||
- drawableHeight) / 2 + padding.top;
|
||||
canvas.translate(drawableX, drawableY);
|
||||
key.icon.setBounds(0, 0, drawableWidth, drawableHeight);
|
||||
key.icon.draw(canvas);
|
||||
icon.setBounds(0, 0, drawableWidth, drawableHeight);
|
||||
icon.draw(canvas);
|
||||
canvas.translate(-drawableX, -drawableY);
|
||||
}
|
||||
canvas.translate(-key.x - kbdPaddingLeft, -key.y - kbdPaddingTop);
|
||||
|
@ -906,16 +918,18 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
|
|||
}
|
||||
}
|
||||
|
||||
// TODO Must fix popup preview on xlarge layout
|
||||
private void showKey(final int keyIndex, PointerTracker tracker) {
|
||||
Key key = tracker.getKey(keyIndex);
|
||||
if (key == null)
|
||||
return;
|
||||
// Should not draw number hint icons
|
||||
if (key.icon != null && !isNumberAtEdgeOfPopupChars(key)) {
|
||||
if (key.icon != null && key.label == null) {
|
||||
mPreviewText.setCompoundDrawables(null, null, null,
|
||||
key.iconPreview != null ? key.iconPreview : key.icon);
|
||||
mPreviewText.setText(null);
|
||||
} else {
|
||||
// TODO Should take care of temporaryShiftLabel here.
|
||||
mPreviewText.setCompoundDrawables(null, null, null, null);
|
||||
mPreviewText.setText(adjustCase(tracker.getPreviewText(key)));
|
||||
if (key.label.length() > 1 && key.codes.length < 2) {
|
||||
|
@ -997,7 +1011,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
|
|||
* Invalidates a key so that it will be redrawn on the next repaint. Use this method if only
|
||||
* one key is changing it's content. Any changes that affect the position or size of the key
|
||||
* may not be honored.
|
||||
* @param key key in the attached {@link Keyboard}.
|
||||
* @param key key in the attached {@link BaseKeyboard}.
|
||||
* @see #invalidateAllKeys
|
||||
*/
|
||||
public void invalidateKey(Key key) {
|
||||
|
@ -1182,11 +1196,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
|
|||
return false;
|
||||
}
|
||||
|
||||
private static boolean isNumberAtEdgeOfPopupChars(Key key) {
|
||||
return isNumberAtLeftmostPopupChar(key) || isNumberAtRightmostPopupChar(key);
|
||||
}
|
||||
|
||||
/* package */ static boolean isNumberAtLeftmostPopupChar(Key key) {
|
||||
private static boolean isNumberAtLeftmostPopupChar(Key key) {
|
||||
if (key.popupCharacters != null && key.popupCharacters.length() > 0
|
||||
&& isAsciiDigit(key.popupCharacters.charAt(0))) {
|
||||
return true;
|
||||
|
@ -1194,14 +1204,6 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
|
|||
return false;
|
||||
}
|
||||
|
||||
/* package */ static boolean isNumberAtRightmostPopupChar(Key key) {
|
||||
if (key.popupCharacters != null && key.popupCharacters.length() > 0
|
||||
&& isAsciiDigit(key.popupCharacters.charAt(key.popupCharacters.length() - 1))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean isAsciiDigit(char c) {
|
||||
return (c < 0x80) && Character.isDigit(c);
|
||||
}
|
||||
|
@ -1221,7 +1223,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
|
|||
final PointerTracker tracker =
|
||||
new PointerTracker(i, mHandler, mKeyDetector, this, mHasDistinctMultitouch);
|
||||
if (keys != null)
|
||||
tracker.setKeyboard(keys, mKeyHysteresisDistance);
|
||||
tracker.setKeyboard(mKeyboard, keys, mKeyHysteresisDistance);
|
||||
if (listener != null)
|
||||
tracker.setOnKeyboardActionListener(listener);
|
||||
pointers.add(tracker);
|
||||
|
|
|
@ -109,9 +109,9 @@ public class LatinKeyboardView extends LatinKeyboardBaseView {
|
|||
@Override
|
||||
protected CharSequence adjustCase(CharSequence label) {
|
||||
BaseKeyboard keyboard = getKeyboard();
|
||||
if (keyboard.isShifted()
|
||||
&& keyboard instanceof LatinKeyboard
|
||||
if (keyboard instanceof LatinKeyboard
|
||||
&& ((LatinKeyboard) keyboard).isAlphaKeyboard()
|
||||
&& keyboard.isShifted()
|
||||
&& !TextUtils.isEmpty(label) && label.length() < 3
|
||||
&& Character.isLowerCase(label.charAt(0))) {
|
||||
label = label.toString().toUpperCase();
|
||||
|
|
|
@ -52,6 +52,7 @@ public class PointerTracker {
|
|||
private OnKeyboardActionListener mListener;
|
||||
private final boolean mHasDistinctMultitouch;
|
||||
|
||||
private BaseKeyboard mKeyboard;
|
||||
private Key[] mKeys;
|
||||
private int mKeyHysteresisDistanceSquared = -1;
|
||||
|
||||
|
@ -179,9 +180,10 @@ public class PointerTracker {
|
|||
mListener = listener;
|
||||
}
|
||||
|
||||
public void setKeyboard(Key[] keys, float keyHysteresisDistance) {
|
||||
if (keys == null || keyHysteresisDistance < 0)
|
||||
public void setKeyboard(BaseKeyboard keyboard, Key[] keys, float keyHysteresisDistance) {
|
||||
if (keyboard == null || keys == null || keyHysteresisDistance < 0)
|
||||
throw new IllegalArgumentException();
|
||||
mKeyboard = keyboard;
|
||||
mKeys = keys;
|
||||
mKeyHysteresisDistanceSquared = (int)(keyHysteresisDistance * keyHysteresisDistance);
|
||||
// Update current key index because keyboard layout has been changed.
|
||||
|
@ -280,7 +282,7 @@ public class PointerTracker {
|
|||
mHandler.startKeyRepeatTimer(REPEAT_START_DELAY, keyIndex, this);
|
||||
mIsRepeatableKey = true;
|
||||
}
|
||||
mHandler.startLongPressTimer(LONGPRESS_TIMEOUT, keyIndex, this);
|
||||
startLongPressTimer(keyIndex);
|
||||
}
|
||||
showKeyPreviewAndUpdateKey(keyIndex);
|
||||
}
|
||||
|
@ -292,14 +294,15 @@ public class PointerTracker {
|
|||
return;
|
||||
KeyState keyState = mKeyState;
|
||||
int keyIndex = keyState.onMoveKey(x, y);
|
||||
if (isValidKeyIndex(keyIndex)) {
|
||||
Key key = getKey(keyIndex);
|
||||
if (key != null) {
|
||||
if (keyState.getKeyIndex() == NOT_A_KEY) {
|
||||
keyState.onMoveToNewKey(keyIndex, x, y);
|
||||
mHandler.startLongPressTimer(LONGPRESS_TIMEOUT, keyIndex, this);
|
||||
startLongPressTimer(keyIndex);
|
||||
} else if (!isMinorMoveBounce(x, y, keyIndex)) {
|
||||
resetMultiTap();
|
||||
keyState.onMoveToNewKey(keyIndex, x, y);
|
||||
mHandler.startLongPressTimer(LONGPRESS_TIMEOUT, keyIndex, this);
|
||||
startLongPressTimer(keyIndex);
|
||||
}
|
||||
} else {
|
||||
if (keyState.getKeyIndex() != NOT_A_KEY) {
|
||||
|
@ -415,6 +418,20 @@ public class PointerTracker {
|
|||
}
|
||||
}
|
||||
|
||||
private void startLongPressTimer(int keyIndex) {
|
||||
Key key = getKey(keyIndex);
|
||||
// If keyboard is in temporary upper case state and the key has temporary shift label,
|
||||
// long press should not be started.
|
||||
if (isTemporaryUpperCase() && key.temporaryShiftLabel != null)
|
||||
return;
|
||||
mHandler.startLongPressTimer(LONGPRESS_TIMEOUT, keyIndex, this);
|
||||
}
|
||||
|
||||
private boolean isTemporaryUpperCase() {
|
||||
return mKeyboard instanceof LatinKeyboard
|
||||
&& ((LatinKeyboard)mKeyboard).isTemporaryUpperCase();
|
||||
}
|
||||
|
||||
private void detectAndSendKey(int index, int x, int y, long eventTime) {
|
||||
final OnKeyboardActionListener listener = mListener;
|
||||
final Key key = getKey(index);
|
||||
|
@ -442,6 +459,14 @@ public class PointerTracker {
|
|||
}
|
||||
code = key.codes[mTapCount];
|
||||
}
|
||||
|
||||
// If keyboard is in temporary upper case state and key has temporary shift label,
|
||||
// alternate character code should be sent.
|
||||
if (isTemporaryUpperCase() && key.temporaryShiftLabel != null) {
|
||||
code = key.temporaryShiftLabel.charAt(0);
|
||||
codes[0] = code;
|
||||
}
|
||||
|
||||
/*
|
||||
* Swap the first and second values in the codes array if the primary code is not
|
||||
* the first value but the second value in the array. This happens when key
|
||||
|
|