am af4efd5a: Merge "Revert "Add autoGenerateFromAlphabet enum to KeyboardSet.Element.elementKeyboard""
* commit 'af4efd5a3ec32d7f1bf61978286f3a7602ce5609': Revert "Add autoGenerateFromAlphabet enum to KeyboardSet.Element.elementKeyboard"main
commit
e245c99486
|
@ -345,21 +345,20 @@
|
||||||
<declare-styleable name="KeyboardSet_Element">
|
<declare-styleable name="KeyboardSet_Element">
|
||||||
<!-- This should be aligned with KeyboardId.ELEMENT_* -->
|
<!-- This should be aligned with KeyboardId.ELEMENT_* -->
|
||||||
<attr name="elementName" format="enum">
|
<attr name="elementName" format="enum">
|
||||||
<enum name="alphabet" value="0" />
|
<enum name="alphabet" value="0" />
|
||||||
<enum name="alphabetManualShifted" value="1" />
|
<!-- TODO: Implement alphabet variant shift keyboards
|
||||||
<enum name="alphabetAutomaticShifted" value="2" />
|
<enum name="alphabetManualTemporaryShift" value="1" />
|
||||||
<enum name="alphabetShiftLocked" value="3" />
|
<enum name="alphabetAutomaticTemporaryShift" value="2" />
|
||||||
<enum name="alphabetShiftLockShifted" value="4" />
|
<enum name="alphabetShiftLock" value="3" />
|
||||||
<enum name="symbols" value="5" />
|
<enum name="alphabetShiftLockShift" value="4" />
|
||||||
<enum name="symbolsShifted" value="6" />
|
-->
|
||||||
<enum name="phone" value="7" />
|
<enum name="symbols" value="5" />
|
||||||
<enum name="phoneShifted" value="8" />
|
<enum name="symbolsShift" value="6" />
|
||||||
<enum name="number" value="9" />
|
<enum name="phone" value="7" />
|
||||||
</attr>
|
<enum name="phoneShift" value="8" />
|
||||||
<attr name="elementKeyboard" format="reference|enum">
|
<enum name="number" value="9" />
|
||||||
<!-- This should be aligned with KeyboardSet.ELEMENT_KEYBOARD_* -->
|
|
||||||
<enum name="autoGenerateFromAlphabet" value="1"/>
|
|
||||||
</attr>
|
</attr>
|
||||||
|
<attr name="elementKeyboard" format="reference" />
|
||||||
<!-- TODO: Add setShifted and setShiftLocked attribute. -->
|
<!-- TODO: Add setShifted and setShiftLocked attribute. -->
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
latin:elementName="symbols"
|
latin:elementName="symbols"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols" />
|
latin:elementKeyboard="@xml/kbd_symbols" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="symbolsShifted"
|
latin:elementName="symbolsShift"
|
||||||
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
latin:elementKeyboard="@xml/kbd_symbols_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phone"
|
latin:elementName="phone"
|
||||||
latin:elementKeyboard="@xml/kbd_phone" />
|
latin:elementKeyboard="@xml/kbd_phone" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="phoneShifted"
|
latin:elementName="phoneShift"
|
||||||
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
latin:elementKeyboard="@xml/kbd_phone_shift" />
|
||||||
<Element
|
<Element
|
||||||
latin:elementName="number"
|
latin:elementName="number"
|
||||||
|
|
|
@ -39,14 +39,16 @@ public class KeyboardId {
|
||||||
public static final int MODE_NUMBER = 5;
|
public static final int MODE_NUMBER = 5;
|
||||||
|
|
||||||
public static final int ELEMENT_ALPHABET = 0;
|
public static final int ELEMENT_ALPHABET = 0;
|
||||||
public static final int ELEMENT_ALPHABET_MANUAL_SHIFTED = 1;
|
/* TODO: Implement alphabet variant shift keyboard.
|
||||||
public static final int ELEMENT_ALPHABET_AUTOMATIC_SHIFTED = 2;
|
public static final int ELEMENT_ALPHABET_MANUAL_TEMPORARY_SHIFT = 1;
|
||||||
public static final int ELEMENT_ALPHABET_SHIFT_LOCKED = 3;
|
public static final int ELEMENT_ALPHABET_AUTOMATIC_TEMPORARY_SHIFT = 2;
|
||||||
public static final int ELEMENT_ALPHABET_SHIFT_LOCK_SHIFTED = 4;
|
public static final int ELEMENT_ALPHABET_SHIFT_LOCK = 3;
|
||||||
|
public static final int ELEMENT_ALPHABET_SHIFT_LOCK_SHIFT = 4;
|
||||||
|
*/
|
||||||
public static final int ELEMENT_SYMBOLS = 5;
|
public static final int ELEMENT_SYMBOLS = 5;
|
||||||
public static final int ELEMENT_SYMBOLS_SHIFTED = 6;
|
public static final int ELEMENT_SYMBOLS_SHIFT = 6;
|
||||||
public static final int ELEMENT_PHONE = 7;
|
public static final int ELEMENT_PHONE = 7;
|
||||||
public static final int ELEMENT_PHONE_SHIFTED = 8;
|
public static final int ELEMENT_PHONE_SHIFT = 8;
|
||||||
public static final int ELEMENT_NUMBER = 9;
|
public static final int ELEMENT_NUMBER = 9;
|
||||||
|
|
||||||
private static final int F2KEY_MODE_NONE = 0;
|
private static final int F2KEY_MODE_NONE = 0;
|
||||||
|
@ -58,7 +60,7 @@ public class KeyboardId {
|
||||||
public final int mOrientation;
|
public final int mOrientation;
|
||||||
public final int mWidth;
|
public final int mWidth;
|
||||||
public final int mMode;
|
public final int mMode;
|
||||||
public final int mElement;
|
public final int mElementState;
|
||||||
private final int mInputType;
|
private final int mInputType;
|
||||||
private final int mImeOptions;
|
private final int mImeOptions;
|
||||||
private final boolean mSettingsKeyEnabled;
|
private final boolean mSettingsKeyEnabled;
|
||||||
|
@ -68,14 +70,14 @@ public class KeyboardId {
|
||||||
|
|
||||||
private final int mHashCode;
|
private final int mHashCode;
|
||||||
|
|
||||||
public KeyboardId(int element, Locale locale, int orientation, int width, int mode,
|
public KeyboardId(int elementState, Locale locale, int orientation, int width, int mode,
|
||||||
int inputType, int imeOptions, boolean settingsKeyEnabled, boolean clobberSettingsKey,
|
int inputType, int imeOptions, boolean settingsKeyEnabled, boolean clobberSettingsKey,
|
||||||
boolean shortcutKeyEnabled, boolean hasShortcutKey) {
|
boolean shortcutKeyEnabled, boolean hasShortcutKey) {
|
||||||
this.mLocale = locale;
|
this.mLocale = locale;
|
||||||
this.mOrientation = orientation;
|
this.mOrientation = orientation;
|
||||||
this.mWidth = width;
|
this.mWidth = width;
|
||||||
this.mMode = mode;
|
this.mMode = mode;
|
||||||
this.mElement = element;
|
this.mElementState = elementState;
|
||||||
this.mInputType = inputType;
|
this.mInputType = inputType;
|
||||||
this.mImeOptions = imeOptions;
|
this.mImeOptions = imeOptions;
|
||||||
this.mSettingsKeyEnabled = settingsKeyEnabled;
|
this.mSettingsKeyEnabled = settingsKeyEnabled;
|
||||||
|
@ -89,7 +91,7 @@ public class KeyboardId {
|
||||||
private static int hashCode(KeyboardId id) {
|
private static int hashCode(KeyboardId id) {
|
||||||
return Arrays.hashCode(new Object[] {
|
return Arrays.hashCode(new Object[] {
|
||||||
id.mOrientation,
|
id.mOrientation,
|
||||||
id.mElement,
|
id.mElementState,
|
||||||
id.mMode,
|
id.mMode,
|
||||||
id.mWidth,
|
id.mWidth,
|
||||||
id.navigateAction(),
|
id.navigateAction(),
|
||||||
|
@ -107,7 +109,7 @@ public class KeyboardId {
|
||||||
if (other == this)
|
if (other == this)
|
||||||
return true;
|
return true;
|
||||||
return other.mOrientation == this.mOrientation
|
return other.mOrientation == this.mOrientation
|
||||||
&& other.mElement == this.mElement
|
&& other.mElementState == this.mElementState
|
||||||
&& other.mMode == this.mMode
|
&& other.mMode == this.mMode
|
||||||
&& other.mWidth == this.mWidth
|
&& other.mWidth == this.mWidth
|
||||||
&& other.navigateAction() == this.navigateAction()
|
&& other.navigateAction() == this.navigateAction()
|
||||||
|
@ -121,19 +123,19 @@ public class KeyboardId {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAlphabetKeyboard() {
|
public boolean isAlphabetKeyboard() {
|
||||||
return mElement < ELEMENT_SYMBOLS;
|
return mElementState < ELEMENT_SYMBOLS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSymbolsKeyboard() {
|
public boolean isSymbolsKeyboard() {
|
||||||
return mElement == ELEMENT_SYMBOLS || mElement == ELEMENT_SYMBOLS_SHIFTED;
|
return mElementState == ELEMENT_SYMBOLS || mElementState == ELEMENT_SYMBOLS_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPhoneKeyboard() {
|
public boolean isPhoneKeyboard() {
|
||||||
return mElement == ELEMENT_PHONE || mElement == ELEMENT_PHONE_SHIFTED;
|
return mElementState == ELEMENT_PHONE || mElementState == ELEMENT_PHONE_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPhoneShiftKeyboard() {
|
public boolean isPhoneShiftKeyboard() {
|
||||||
return mElement == ELEMENT_PHONE_SHIFTED;
|
return mElementState == ELEMENT_PHONE_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean navigateAction() {
|
public boolean navigateAction() {
|
||||||
|
@ -188,7 +190,7 @@ public class KeyboardId {
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("[%s %s %s%d %s %s %s%s%s%s%s%s%s]",
|
return String.format("[%s %s %s%d %s %s %s%s%s%s%s%s%s]",
|
||||||
elementToString(mElement),
|
elementStateToString(mElementState),
|
||||||
mLocale,
|
mLocale,
|
||||||
(mOrientation == 1 ? "port" : "land"), mWidth,
|
(mOrientation == 1 ? "port" : "land"), mWidth,
|
||||||
modeName(mMode),
|
modeName(mMode),
|
||||||
|
@ -211,17 +213,19 @@ public class KeyboardId {
|
||||||
&& TextUtils.equals(a.privateImeOptions, b.privateImeOptions);
|
&& TextUtils.equals(a.privateImeOptions, b.privateImeOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String elementToString(int element) {
|
public static String elementStateToString(int elementState) {
|
||||||
switch (element) {
|
switch (elementState) {
|
||||||
case ELEMENT_ALPHABET: return "alphabet";
|
case ELEMENT_ALPHABET: return "alphabet";
|
||||||
case ELEMENT_ALPHABET_MANUAL_SHIFTED: return "alphabetManualShifted";
|
/* TODO: Implement alphabet variant shift keyboard.
|
||||||
case ELEMENT_ALPHABET_AUTOMATIC_SHIFTED: return "alphabetAutomaticShifted";
|
case ELEMENT_ALPHABET_MANUAL_TEMPORARY_SHIFT: return "alphabetManualTemporaryShift";
|
||||||
case ELEMENT_ALPHABET_SHIFT_LOCKED: return "alphabetShiftLocked";
|
case ELEMENT_ALPHABET_AUTOMATIC_TEMPORARY_SHIFT: return "alphabetAutomaticTemporaryShift";
|
||||||
case ELEMENT_ALPHABET_SHIFT_LOCK_SHIFTED: return "alphabetShiftLockShifted";
|
case ELEMENT_ALPHABET_SHIFT_LOCK: return "alphabetShiftLock";
|
||||||
|
case ELEMENT_ALPHABET_SHIFT_LOCK_SHIFT: return "alphabetShiftLockShift";
|
||||||
|
*/
|
||||||
case ELEMENT_SYMBOLS: return "symbols";
|
case ELEMENT_SYMBOLS: return "symbols";
|
||||||
case ELEMENT_SYMBOLS_SHIFTED: return "symbolsShifted";
|
case ELEMENT_SYMBOLS_SHIFT: return "symbolsShift";
|
||||||
case ELEMENT_PHONE: return "phone";
|
case ELEMENT_PHONE: return "phone";
|
||||||
case ELEMENT_PHONE_SHIFTED: return "phoneShifted";
|
case ELEMENT_PHONE_SHIFT: return "phoneShift";
|
||||||
case ELEMENT_NUMBER: return "number";
|
case ELEMENT_NUMBER: return "number";
|
||||||
default: return null;
|
default: return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,6 @@ import android.content.res.Resources;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
import android.content.res.XmlResourceParser;
|
import android.content.res.XmlResourceParser;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.TypedValue;
|
|
||||||
import android.util.Xml;
|
import android.util.Xml;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
|
|
||||||
|
@ -55,12 +54,10 @@ public class KeyboardSet {
|
||||||
private static final String TAG_KEYBOARD_SET = TAG;
|
private static final String TAG_KEYBOARD_SET = TAG;
|
||||||
private static final String TAG_ELEMENT = "Element";
|
private static final String TAG_ELEMENT = "Element";
|
||||||
|
|
||||||
private static final int ELEMENT_KEYBOARD_AUTO_GENERATE_FROM_ALPHABET = 1;
|
|
||||||
|
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private final Params mParams;
|
private final Params mParams;
|
||||||
|
|
||||||
static class Params {
|
private static class Params {
|
||||||
int mMode;
|
int mMode;
|
||||||
int mInputType;
|
int mInputType;
|
||||||
int mImeOptions;
|
int mImeOptions;
|
||||||
|
@ -107,18 +104,16 @@ public class KeyboardSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Keyboard getKeyboard(boolean isSymbols, boolean isShift) {
|
private Keyboard getKeyboard(boolean isSymbols, boolean isShift) {
|
||||||
final int element = KeyboardSet.getElement(mParams.mMode, isSymbols, isShift);
|
final int elementState = Builder.getElementState(mParams.mMode, isSymbols, isShift);
|
||||||
// TODO: If xmlId is ELEMENT_KEYBOARD_AUTO_GENERATE_FROM_ALPHABET, auto generate the
|
final int xmlId = mParams.mElementKeyboards.get(elementState);
|
||||||
// keyboard based on base main alphabet keyboard considering element.
|
final KeyboardId id = Builder.getKeyboardId(elementState, isSymbols, mParams);
|
||||||
final int xmlId = mParams.mElementKeyboards.get(element);
|
|
||||||
final KeyboardId id = KeyboardSet.getKeyboardId(element, isSymbols, mParams);
|
|
||||||
final Keyboard keyboard = getKeyboard(mContext, xmlId, id);
|
final Keyboard keyboard = getKeyboard(mContext, xmlId, id);
|
||||||
return keyboard;
|
return keyboard;
|
||||||
}
|
}
|
||||||
|
|
||||||
public KeyboardId getMainKeyboardId() {
|
public KeyboardId getMainKeyboardId() {
|
||||||
final int element = KeyboardSet.getElement(mParams.mMode, false, false);
|
final int elementState = Builder.getElementState(mParams.mMode, false, false);
|
||||||
return KeyboardSet.getKeyboardId(element, false, mParams);
|
return Builder.getKeyboardId(elementState, false, mParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Keyboard getKeyboard(Context context, int xmlId, KeyboardId id) {
|
private Keyboard getKeyboard(Context context, int xmlId, KeyboardId id) {
|
||||||
|
@ -152,30 +147,6 @@ public class KeyboardSet {
|
||||||
return keyboard;
|
return keyboard;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getElement(int mode, boolean isSymbols, boolean isShift) {
|
|
||||||
switch (mode) {
|
|
||||||
case KeyboardId.MODE_PHONE:
|
|
||||||
return (isSymbols && isShift)
|
|
||||||
? KeyboardId.ELEMENT_PHONE_SHIFTED : KeyboardId.ELEMENT_PHONE;
|
|
||||||
case KeyboardId.MODE_NUMBER:
|
|
||||||
return KeyboardId.ELEMENT_NUMBER;
|
|
||||||
default:
|
|
||||||
if (isSymbols) {
|
|
||||||
return isShift
|
|
||||||
? KeyboardId.ELEMENT_SYMBOLS_SHIFTED : KeyboardId.ELEMENT_SYMBOLS;
|
|
||||||
}
|
|
||||||
return KeyboardId.ELEMENT_ALPHABET;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static KeyboardId getKeyboardId(int element, boolean isSymbols, Params params) {
|
|
||||||
final boolean hasShortcutKey = params.mVoiceKeyEnabled
|
|
||||||
&& (isSymbols != params.mVoiceKeyOnMain);
|
|
||||||
return new KeyboardId(element, params.mLocale, params.mOrientation, params.mWidth,
|
|
||||||
params.mMode, params.mInputType, params.mImeOptions, params.mSettingsKeyEnabled,
|
|
||||||
params.mNoSettingsKey, params.mVoiceKeyEnabled, hasShortcutKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Builder {
|
public static class Builder {
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private final String mPackageName;
|
private final String mPackageName;
|
||||||
|
@ -247,6 +218,31 @@ public class KeyboardSet {
|
||||||
return new KeyboardSet(mContext, mParams);
|
return new KeyboardSet(mContext, mParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Move this method to KeyboardSet
|
||||||
|
static KeyboardId getKeyboardId(int elementState, boolean isSymbols, Params params) {
|
||||||
|
final boolean hasShortcutKey = params.mVoiceKeyEnabled
|
||||||
|
&& (isSymbols != params.mVoiceKeyOnMain);
|
||||||
|
return new KeyboardId(elementState, params.mLocale, params.mOrientation, params.mWidth,
|
||||||
|
params.mMode, params.mInputType, params.mImeOptions, params.mSettingsKeyEnabled,
|
||||||
|
params.mNoSettingsKey, params.mVoiceKeyEnabled, hasShortcutKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Move this method to KeyboardSet
|
||||||
|
static int getElementState(int mode, boolean isSymbols, boolean isShift) {
|
||||||
|
switch (mode) {
|
||||||
|
case KeyboardId.MODE_PHONE:
|
||||||
|
return (isSymbols && isShift)
|
||||||
|
? KeyboardId.ELEMENT_PHONE_SHIFT : KeyboardId.ELEMENT_PHONE;
|
||||||
|
case KeyboardId.MODE_NUMBER:
|
||||||
|
return KeyboardId.ELEMENT_NUMBER;
|
||||||
|
default:
|
||||||
|
if (isSymbols) {
|
||||||
|
return isShift ? KeyboardId.ELEMENT_SYMBOLS_SHIFT : KeyboardId.ELEMENT_SYMBOLS;
|
||||||
|
}
|
||||||
|
return KeyboardId.ELEMENT_ALPHABET;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void parseKeyboardSet(Resources res, int resId) throws XmlPullParserException,
|
private void parseKeyboardSet(Resources res, int resId) throws XmlPullParserException,
|
||||||
IOException {
|
IOException {
|
||||||
final XmlResourceParser parser = res.getXml(resId);
|
final XmlResourceParser parser = res.getXml(resId);
|
||||||
|
@ -304,14 +300,8 @@ public class KeyboardSet {
|
||||||
|
|
||||||
final int elementName = a.getInt(
|
final int elementName = a.getInt(
|
||||||
R.styleable.KeyboardSet_Element_elementName, 0);
|
R.styleable.KeyboardSet_Element_elementName, 0);
|
||||||
final int index = R.styleable.KeyboardSet_Element_elementKeyboard;
|
final int elementKeyboard = a.getResourceId(
|
||||||
final TypedValue v = a.peekValue(index);
|
R.styleable.KeyboardSet_Element_elementKeyboard, 0);
|
||||||
final int elementKeyboard;
|
|
||||||
if (v.type == TypedValue.TYPE_REFERENCE) {
|
|
||||||
elementKeyboard = a.getResourceId(index, 0);
|
|
||||||
} else {
|
|
||||||
elementKeyboard = a.getInt(index, 0);
|
|
||||||
}
|
|
||||||
mParams.mElementKeyboards.put(elementName, elementKeyboard);
|
mParams.mElementKeyboards.put(elementName, elementKeyboard);
|
||||||
} finally {
|
} finally {
|
||||||
a.recycle();
|
a.recycle();
|
||||||
|
|
|
@ -43,8 +43,6 @@ public class KeyboardState {
|
||||||
public void setAlphabetManualShiftedKeyboard();
|
public void setAlphabetManualShiftedKeyboard();
|
||||||
public void setAlphabetAutomaticShiftedKeyboard();
|
public void setAlphabetAutomaticShiftedKeyboard();
|
||||||
public void setAlphabetShiftLockedKeyboard();
|
public void setAlphabetShiftLockedKeyboard();
|
||||||
// TODO: Add this.
|
|
||||||
//public void setAlphabetShiftLockShiftedKeyboard();
|
|
||||||
public void setSymbolsKeyboard();
|
public void setSymbolsKeyboard();
|
||||||
public void setSymbolsShiftedKeyboard();
|
public void setSymbolsShiftedKeyboard();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue