Merge "Adaptive keyboard width/position parser"

main
Tadashi G. Takaoka 2011-05-31 01:55:44 -07:00 committed by Android (Google) Code Review
commit e99738564a
39 changed files with 548 additions and 563 deletions

View File

@ -94,8 +94,16 @@
<!-- Minimum keyboard height represented in pixels, percentage of display height if fraction <!-- Minimum keyboard height represented in pixels, percentage of display height if fraction
is positive, or percentage of display width if fraction is negative. --> is positive, or percentage of display width if fraction is negative. -->
<attr name="minKeyboardHeight" format="dimension|fraction" /> <attr name="minKeyboardHeight" format="dimension|fraction" />
<!-- Default width of a key, in pixels or percentage of display width. --> <!-- Default width of a key, in pixels or percentage of display width.
<attr name="keyWidth" format="dimension|fraction" /> If the value is zero, the actual key width will be determined to fill out the area up
to the right edge of the keyboard.
If the value is negative, the actual key width will be determined to fill out the
area between the nearest key on the left hand side and the right edge of the keyboard.
-->
<attr name="keyWidth" format="dimension|fraction|enum">
<enum name="fillRight" value="0" />
<enum name="fillBoth" value="-1" />
</attr>
<!-- Default height of a row (key height + vertical gap), in pixels or percentage of <!-- Default height of a row (key height + vertical gap), in pixels or percentage of
keyboard height. --> keyboard height. -->
<attr name="rowHeight" format="dimension|fraction" /> <attr name="rowHeight" format="dimension|fraction" />
@ -161,6 +169,9 @@
<!-- Visual insets --> <!-- Visual insets -->
<attr name="visualInsetsLeft" format="dimension|fraction" /> <attr name="visualInsetsLeft" format="dimension|fraction" />
<attr name="visualInsetsRight" format="dimension|fraction" /> <attr name="visualInsetsRight" format="dimension|fraction" />
<!-- The X-coordinate of upper right corner of this key including horizontal gap.
If the value is negative, the origin is the right edge of the keyboard. -->
<attr name="keyXPos" format="dimension|fraction" />
</declare-styleable> </declare-styleable>
<declare-styleable name="Keyboard_Row"> <declare-styleable name="Keyboard_Row">

View File

@ -27,12 +27,12 @@
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
<Row <Row
latin:keyWidth="7.49%p" latin:keyWidth="7.579%p"
> >
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="ض" /> latin:keyLabel="ض" />
@ -61,16 +61,17 @@
latin:popupCharacters="ج,چ" /> latin:popupCharacters="ج,چ" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.331%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="7.49%p" latin:keyWidth="7.500%p"
> >
<Key <Key
latin:keyStyle="toSymbolKeyStyle" latin:keyStyle="toSymbolKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="9.219%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="ش" /> latin:keyLabel="ش" />
@ -100,15 +101,19 @@
latin:keyLabel="ط" /> latin:keyLabel="ط" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="8.593%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="8.042%p" latin:keyWidth="7.500%p"
> >
<Key <Key
latin:keyLabel="ئ" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="9.219%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="ئ" />
<Key <Key
latin:keyLabel="ء" /> latin:keyLabel="ء" />
<Key <Key
@ -132,7 +137,8 @@
latin:keyLabel="د" /> latin:keyLabel="د" />
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="11.736%p" latin:keyXPos="-13.750%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include latin:keyboardLayout="@xml/kbd_qwerty_row4" /> <include latin:keyboardLayout="@xml/kbd_qwerty_row4" />

View File

@ -24,12 +24,12 @@
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
<Row <Row
latin:keyWidth="8.272%p" latin:keyWidth="8.282%p"
> >
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="a" latin:keyLabel="a"
@ -63,11 +63,12 @@
latin:popupCharacters="@string/alternates_for_p" /> latin:popupCharacters="@string/alternates_for_p" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.331%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="8.157%p" latin:keyWidth="8.125%p"
> >
<Key <Key
latin:keyStyle="toSymbolKeyStyle" latin:keyStyle="toSymbolKeyStyle"
@ -103,15 +104,16 @@
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="8.593%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="8.042%p" latin:keyWidth="8.047%p"
> >
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="15.192%p" latin:keyWidth="13.829%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="w" latin:keyLabel="w"
@ -161,7 +163,8 @@
</switch> </switch>
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="12.530%p" latin:keyXPos="-13.750%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include <include

View File

@ -24,12 +24,12 @@
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
<Row <Row
latin:keyWidth="8.272%p" latin:keyWidth="8.282%p"
> >
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="," /> latin:keyLabel="," />
@ -53,11 +53,12 @@
latin:keyLabel="פ" /> latin:keyLabel="פ" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.331%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="8.157%p" latin:keyWidth="8.125%p"
> >
<Key <Key
latin:keyStyle="toSymbolKeyStyle" latin:keyStyle="toSymbolKeyStyle"
@ -89,15 +90,16 @@
latin:keyLabel="ף" /> latin:keyLabel="ף" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="8.593%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="8.042%p" latin:keyWidth="8.047%p"
> >
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="15.192%p" latin:keyWidth="13.829%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="ז" latin:keyLabel="ז"
@ -123,7 +125,8 @@
latin:popupCharacters="ץ,ץ׳" /> latin:popupCharacters="ץ,ץ׳" />
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="12.530%p" latin:keyXPos="-13.750%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include latin:keyboardLayout="@xml/kbd_qwerty_row4" /> <include latin:keyboardLayout="@xml/kbd_qwerty_row4" />

View File

@ -24,7 +24,7 @@
latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" latin:maxKeyboardHeight="@fraction/maxKeyboardHeight"
latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:minKeyboardHeight="@fraction/minKeyboardHeight"
latin:rowHeight="25%p" latin:rowHeight="25%p"
latin:keyWidth="11.949%p" latin:keyWidth="11.954%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template" latin:popupKeyboardTemplate="@xml/kbd_popup_template"
@ -40,42 +40,42 @@
> >
<!-- This row is intentionally not marked as a top row --> <!-- This row is intentionally not marked as a top row -->
<Row> <Row>
<Spacer
latin:horizontalGap="32.076%p" />
<Key <Key
latin:keyStyle="num1KeyStyle" /> latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft"
latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" />
<Key
latin:keyStyle="num1KeyStyle"
latin:keyXPos="32.076%p" />
<Key <Key
latin:keyStyle="num2KeyStyle" /> latin:keyStyle="num2KeyStyle" />
<Key <Key
latin:keyStyle="num3KeyStyle" /> latin:keyStyle="num3KeyStyle" />
<Spacer
latin:horizontalGap="22.272%p" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.804%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
<Spacer
latin:horizontalGap="32.076%p" />
<Key <Key
latin:keyStyle="num4KeyStyle" /> latin:keyStyle="num4KeyStyle"
latin:keyXPos="32.076%p" />
<Key <Key
latin:keyStyle="num5KeyStyle" /> latin:keyStyle="num5KeyStyle" />
<Key <Key
latin:keyStyle="num6KeyStyle" /> latin:keyStyle="num6KeyStyle" />
<Spacer
latin:horizontalGap="17.371%p" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="14.706%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
<Spacer
latin:horizontalGap="32.076%p" />
<Key <Key
latin:keyStyle="num7KeyStyle" /> latin:keyStyle="num7KeyStyle"
latin:keyXPos="32.076%p" />
<Key <Key
latin:keyStyle="num8KeyStyle" /> latin:keyStyle="num8KeyStyle" />
<Key <Key
@ -87,7 +87,7 @@
<!-- This row is intentionally not marked as a bottom row --> <!-- This row is intentionally not marked as a bottom row -->
<Row> <Row>
<Spacer <Spacer
latin:horizontalGap="44.026%p" /> latin:keyXPos="32.076%p" />
<Key <Key
latin:keyStyle="num0KeyStyle" /> latin:keyStyle="num0KeyStyle" />
<!-- There is an empty area below the "Enter" key and right of the "#" key. To <!-- There is an empty area below the "Enter" key and right of the "#" key. To
@ -102,79 +102,72 @@
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyLabel="-" latin:keyLabel="-"
latin:keyWidth="8.042%p" /> latin:keyXPos="13.829%p"
latin:keyWidth="8.047%p" />
<Key <Key
latin:keyLabel="+" latin:keyLabel="+"
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyLabel="1" /> latin:keyLabel="1"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyLabel="2" /> latin:keyLabel="2" />
<Key <Key
latin:keyLabel="3" /> latin:keyLabel="3" />
<Spacer
latin:horizontalGap="9.360%p" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.804%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
<Spacer
latin:horizontalGap="16.406%p" />
<Key <Key
latin:keyLabel="*" latin:keyLabel="*"
latin:keyWidth="8.042%p" /> latin:keyXPos="13.829%p"
latin:keyWidth="8.047%p" />
<Key <Key
latin:keyLabel="/" latin:keyLabel="/"
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Key <Key
latin:keyLabel="," latin:keyLabel=","
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyLabel="4" /> latin:keyLabel="4"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyLabel="5" /> latin:keyLabel="5" />
<Key <Key
latin:keyLabel="6" /> latin:keyLabel="6" />
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="14.706%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
<!-- There is an empty area below the "More" key and left of the "(" key. To <!-- There is an empty area below the "More" key and left of the "(" key. To
ignore the touch event on the area, "(" is intentionally not marked as a left ignore the touch event on the area, "(" is intentionally not marked as a left
edge key. --> edge key. -->
<Spacer
latin:horizontalGap="16.406%p" />
<Key <Key
latin:keyLabel="(" latin:keyLabel="("
latin:keyWidth="8.042%p" /> latin:keyXPos="13.829%p"
latin:keyWidth="8.047%p" />
<Key <Key
latin:keyLabel=")" latin:keyLabel=")"
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Key <Key
latin:keyLabel="=" latin:keyLabel="="
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyLabel="7" /> latin:keyLabel="7"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyLabel="8" /> latin:keyLabel="8" />
<Key <Key
@ -185,29 +178,20 @@
</Row> </Row>
<!-- This row is intentionally not marked as a bottom row --> <!-- This row is intentionally not marked as a bottom row -->
<Row> <Row>
<!-- There is an empty area below the "More" key and left of the "space" key. To
ignore the touch event on the area, "space" is intentionally not marked as a
left edge key. -->
<Spacer
latin:horizontalGap="8.362%p" />
<switch> <switch>
<case latin:hasSettingsKey="true"> <case latin:hasSettingsKey="true">
<Key <Key
latin:keyStyle="settingsKeyStyle" latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
</case> </case>
<default>
<Spacer
latin:horizontalGap="8.042%p" />
</default>
</switch> </switch>
<Key <Key
latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle" latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle"
latin:keyWidth="24.127%p" /> latin:keyXPos="13.829%p"
<Spacer latin:keyWidth="24.140%p" />
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyLabel="*" /> latin:keyLabel="*"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyLabel="0" /> latin:keyLabel="0" />
<Key <Key
@ -218,12 +202,10 @@
> >
<Key <Key
latin:keyStyle="micKeyStyle" latin:keyStyle="micKeyStyle"
latin:keyWidth="8.042%p" /> latin:keyXPos="-8.047%p"
latin:keyWidth="fillRight" />
</case> </case>
</switch> </switch>
<!-- There is an empty area below the "Enter" key and right of the "#" key. To
ignore the touch event on the area, "#" is intentionally not marked as a right
edge key. -->
</Row> </Row>
</default> </default>
</switch> </switch>

View File

@ -24,7 +24,7 @@
latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" latin:maxKeyboardHeight="@fraction/maxKeyboardHeight"
latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:minKeyboardHeight="@fraction/minKeyboardHeight"
latin:rowHeight="25%p" latin:rowHeight="25%p"
latin:keyWidth="11.949%p" latin:keyWidth="11.954%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template" latin:popupKeyboardTemplate="@xml/kbd_popup_template"
@ -39,115 +39,101 @@
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<!-- To match one character label size with "Tab", I placed spaces around the char '-' <!-- To match one character label size with "Tab", I placed spaces around the char '-'
and '+'. --> and '+'. -->
<Spacer
latin:horizontalGap="8.470%p" />
<Key <Key
latin:code="45" latin:code="45"
latin:keyLabel=" - " latin:keyLabel=" - "
latin:keyWidth="8.042%p" /> latin:keyXPos="20.400%p"
latin:keyWidth="8.047%p" />
<Key <Key
latin:code="43" latin:code="43"
latin:keyLabel=" + " latin:keyLabel=" + "
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Spacer
latin:horizontalGap="8.479%p" />
<Key <Key
latin:keyStyle="num1KeyStyle" /> latin:keyStyle="num1KeyStyle"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyStyle="num2KeyStyle" /> latin:keyStyle="num2KeyStyle" />
<Key <Key
latin:keyStyle="num3KeyStyle" /> latin:keyStyle="num3KeyStyle" />
<Spacer
latin:horizontalGap="9.360%p" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.804%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
<Key <Key
latin:keyStyle="moreKeyStyle" latin:keyStyle="moreKeyStyle"
latin:keyWidth="11.172%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<!-- To match one character label size with "More", I placed spaces around the char ',' <!-- To match one character label size with "More", I placed spaces around the char ','
and '.'. --> and '.'. -->
<Spacer
latin:horizontalGap="8.470%p" />
<Key <Key
latin:code="44" latin:code="44"
latin:keyLabel=" , " latin:keyLabel=" , "
latin:keyWidth="8.042%p" /> latin:keyXPos="20.400%p"
latin:keyWidth="8.047%p" />
<Key <Key
latin:code="46" latin:code="46"
latin:keyLabel=" . " latin:keyLabel=" . "
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Spacer
latin:horizontalGap="8.479%p" />
<Key <Key
latin:keyStyle="num4KeyStyle" /> latin:keyStyle="num4KeyStyle"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyStyle="num5KeyStyle" /> latin:keyStyle="num5KeyStyle" />
<Key <Key
latin:keyStyle="num6KeyStyle" /> latin:keyStyle="num6KeyStyle" />
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="14.706%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
<!-- To match one character label size with "More", I placed spaces around the char '(' <!-- To match one character label size with "More", I placed spaces around the char '('
and ')'. --> and ')'. -->
<!-- There is an empty area bellow the "More" key and left of the "(" key. To ignore <!-- There is an empty area below the "More" key and left of the "(" key. To ignore
the touch event on the area, "(" is intentionally not marked as a left edge key. --> the touch event on the area, "(" is intentionally not marked as a left edge key. -->
<Spacer
latin:horizontalGap="20.427%p" />
<Key <Key
latin:code="40" latin:code="40"
latin:keyLabel=" ( " latin:keyLabel=" ( "
latin:keyWidth="8.042%p" /> latin:keyXPos="20.400%p"
latin:keyWidth="8.047%p" />
<Key <Key
latin:code="41" latin:code="41"
latin:keyLabel=" ) " latin:keyLabel=" ) "
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Spacer
latin:horizontalGap="8.479%p" />
<Key <Key
latin:keyStyle="num7KeyStyle" /> latin:keyStyle="num7KeyStyle"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyStyle="num8KeyStyle" /> latin:keyStyle="num8KeyStyle" />
<Key <Key
latin:keyStyle="num9KeyStyle" /> latin:keyStyle="num9KeyStyle" />
<!-- There is an empty area bellow the "Enter" key and right of the "9" key. To ignore <!-- There is an empty area below the "Enter" key and right of the "9" key. To ignore
the touch event on the area, "9" is intentionally not marked as a right edge key. --> the touch event on the area, "9" is intentionally not marked as a right edge key. -->
</Row> </Row>
<!-- This row is intentionally not marked as a bottom row --> <!-- This row is intentionally not marked as a bottom row -->
<Row> <Row>
<!-- There is an empty area bellow the "More" key and left of the "space" key. To ignore
the touch event on the area, "space" is intentionally not marked as a left edge key. -->
<Spacer
latin:horizontalGap="12.340%p" />
<switch> <switch>
<case latin:hasSettingsKey="true"> <case latin:hasSettingsKey="true">
<Key <Key
latin:keyStyle="settingsKeyStyle" latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
</case> </case>
<default>
<Spacer
latin:horizontalGap="8.042%p" />
</default>
</switch> </switch>
<Key <Key
latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle" latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle"
latin:keyXPos="20.400%p"
latin:keyWidth="16.084%p" /> latin:keyWidth="16.084%p" />
<Spacer
latin:horizontalGap="8.479%p" />
<Key <Key
latin:keyStyle="numStarKeyStyle" /> latin:keyStyle="numStarKeyStyle"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyStyle="num0KeyStyle" /> latin:keyStyle="num0KeyStyle" />
<Key <Key
@ -158,10 +144,9 @@
> >
<Key <Key
latin:keyStyle="micKeyStyle" latin:keyStyle="micKeyStyle"
latin:keyWidth="8.042%p" /> latin:keyXPos="-8.047%p"
latin:keyWidth="fillRight" />
</case> </case>
</switch> </switch>
<!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore
the touch event on the area, "#" is intentionally not marked as a right edge key. -->
</Row> </Row>
</Keyboard> </Keyboard>

View File

@ -24,7 +24,7 @@
latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" latin:maxKeyboardHeight="@fraction/maxKeyboardHeight"
latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:minKeyboardHeight="@fraction/minKeyboardHeight"
latin:rowHeight="25%p" latin:rowHeight="25%p"
latin:keyWidth="11.949%p" latin:keyWidth="11.954%p"
latin:horizontalGap="@dimen/key_horizontal_gap" latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap" latin:verticalGap="@dimen/key_bottom_gap"
latin:popupKeyboardTemplate="@xml/kbd_popup_template" latin:popupKeyboardTemplate="@xml/kbd_popup_template"
@ -39,127 +39,113 @@
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:code="45" latin:code="45"
latin:keyLabel=" - " latin:keyLabel=" - "
latin:keyWidth="8.042%p" /> latin:keyXPos="13.829%p"
latin:keyWidth="8.047%p" />
<Key <Key
latin:code="43" latin:code="43"
latin:keyLabel=" + " latin:keyLabel=" + "
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Key <Key
latin:code="44" latin:code="44"
latin:keyLabel="@string/label_pause_key" latin:keyLabel="@string/label_pause_key"
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<!-- To match one character label size with "Tab" and "Pause, I placed spaces around the <!-- To match one character label size with "Tab" and "Pause, I placed spaces around the
char '-' and '+'. --> char '-' and '+'. -->
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyStyle="num1KeyStyle" /> latin:keyStyle="num1KeyStyle"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyStyle="num2KeyStyle" /> latin:keyStyle="num2KeyStyle" />
<Key <Key
latin:keyStyle="num3KeyStyle" /> latin:keyStyle="num3KeyStyle" />
<Spacer
latin:horizontalGap="9.360%p" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.804%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
<Key <Key
latin:keyStyle="moreKeyStyle" latin:keyStyle="moreKeyStyle"
latin:keyWidth="11.172%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:code="44" latin:code="44"
latin:keyLabel=" , " latin:keyLabel=" , "
latin:keyWidth="8.042%p" /> latin:keyXPos="13.829%p"
latin:keyWidth="8.047%p" />
<Key <Key
latin:code="46" latin:code="46"
latin:keyLabel=" . " latin:keyLabel=" . "
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Key <Key
latin:code="59" latin:code="59"
latin:keyLabel="@string/label_wait_key" latin:keyLabel="@string/label_wait_key"
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<!-- To match one character label size with "More" and "Wait", I placed spaces around the <!-- To match one character label size with "More" and "Wait", I placed spaces around the
char ',' and '.'. --> char ',' and '.'. -->
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyStyle="num4KeyStyle" /> latin:keyStyle="num4KeyStyle"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyStyle="num5KeyStyle" /> latin:keyStyle="num5KeyStyle" />
<Key <Key
latin:keyStyle="num6KeyStyle" /> latin:keyStyle="num6KeyStyle" />
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="14.706%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
<!-- To match one character label size with "More" and etc., I placed spaces around the <!-- To match one character label size with "More" and etc., I placed spaces around the
char 'N', '(' and ')'. --> char 'N', '(' and ')'. -->
<!-- There is an empty area bellow the "More" key and left of the "(" key. To ignore <!-- There is an empty area below the "More" key and left of the "(" key. To ignore
the touch event on the area, "(" is intentionally not marked as a left edge key. --> the touch event on the area, "(" is intentionally not marked as a left edge key. -->
<Spacer
latin:horizontalGap="16.406%p" />
<Key <Key
latin:code="40" latin:code="40"
latin:keyLabel=" ( " latin:keyLabel=" ( "
latin:keyWidth="8.042%p" /> latin:keyXPos="13.829%p"
latin:keyWidth="8.047%p" />
<Key <Key
latin:code="41" latin:code="41"
latin:keyLabel=" ) " latin:keyLabel=" ) "
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Key <Key
latin:code="78" latin:code="78"
latin:keyLabel=" N " latin:keyLabel=" N "
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
<Spacer
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyStyle="num7KeyStyle" /> latin:keyStyle="num7KeyStyle"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyStyle="num8KeyStyle" /> latin:keyStyle="num8KeyStyle" />
<Key <Key
latin:keyStyle="num9KeyStyle" /> latin:keyStyle="num9KeyStyle" />
<!-- There is an empty area bellow the "Enter" key and right of the "9" key. To ignore <!-- There is an empty area below the "Enter" key and right of the "9" key. To ignore
the touch event on the area, "9" is intentionally not marked as a right edge key. --> the touch event on the area, "9" is intentionally not marked as a right edge key. -->
</Row> </Row>
<!-- This row is intentionally not marked as a bottom row --> <!-- This row is intentionally not marked as a bottom row -->
<Row> <Row>
<!-- There is an empty area bellow the "More" key and left of the "space" key. To ignore
the touch event on the area, "space" is intentionally not marked as a left edge key. -->
<Spacer
latin:horizontalGap="8.362%p" />
<switch> <switch>
<case latin:hasSettingsKey="true"> <case latin:hasSettingsKey="true">
<Key <Key
latin:keyStyle="settingsKeyStyle" latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.042%p" /> latin:keyWidth="8.047%p" />
</case> </case>
<default>
<Spacer
latin:horizontalGap="8.042%p" />
</default>
</switch> </switch>
<Key <Key
latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle" latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle"
latin:keyWidth="24.127%p" /> latin:keyXPos="13.829%p"
<Spacer latin:keyWidth="24.140%p" />
latin:horizontalGap="4.458%p" />
<Key <Key
latin:keyStyle="numStarKeyStyle" /> latin:keyStyle="numStarKeyStyle"
latin:keyXPos="45.000%p" />
<Key <Key
latin:keyStyle="num0KeyStyle" /> latin:keyStyle="num0KeyStyle" />
<Key <Key
@ -170,10 +156,9 @@
> >
<Key <Key
latin:keyStyle="micKeyStyle" latin:keyStyle="micKeyStyle"
latin:keyWidth="8.042%p" /> latin:keyXPos="-8.047%p"
latin:keyWidth="fillRight" />
</case> </case>
</switch> </switch>
<!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore
the touch event on the area, "#" is intentionally not marked as a right edge key. -->
</Row> </Row>
</Keyboard> </Keyboard>

View File

@ -23,12 +23,12 @@
> >
<!-- This row is intentionally not marked as a top row --> <!-- This row is intentionally not marked as a top row -->
<Row <Row
latin:keyWidth="8.272%p" latin:keyWidth="8.282%p"
> >
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="q" latin:keyLabel="q"
@ -62,7 +62,8 @@
latin:popupCharacters="@string/alternates_for_p" /> latin:popupCharacters="@string/alternates_for_p" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.331%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
</merge> </merge>

View File

@ -22,12 +22,12 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<Row <Row
latin:keyWidth="8.157%p" latin:keyWidth="8.125%p"
> >
<Key <Key
latin:keyStyle="toSymbolKeyStyle" latin:keyStyle="toSymbolKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="11.167%p" latin:keyWidth="11.172%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="a" latin:keyLabel="a"
@ -55,7 +55,8 @@
latin:popupCharacters="@string/alternates_for_l" /> latin:popupCharacters="@string/alternates_for_l" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="15.750%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
</merge> </merge>

View File

@ -22,11 +22,11 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<Row <Row
latin:keyWidth="8.042%p" latin:keyWidth="8.047%p"
> >
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="15.192%p" latin:keyWidth="13.829%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="z" latin:keyLabel="z"
@ -72,7 +72,8 @@
</switch> </switch>
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="12.530%p" latin:keyXPos="-13.750%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
</merge> </merge>

View File

@ -23,20 +23,18 @@
> >
<!-- This row is intentionally not marked as a bottom row --> <!-- This row is intentionally not marked as a bottom row -->
<Row <Row
latin:keyWidth="8.042%p" latin:keyWidth="8.047%p"
> >
<Spacer
latin:horizontalGap="8.362%p" />
<switch> <switch>
<case latin:hasSettingsKey="true"> <case latin:hasSettingsKey="true">
<Key <Key
latin:keyStyle="settingsKeyStyle" /> latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.047%p" />
</case> </case>
<default>
<Spacer
latin:horizontalGap="8.042%p" />
</default>
</switch> </switch>
<Spacer
latin:keyXPos="15.157%p"
latin:keyWidth="fillRight" />
<switch> <switch>
<case <case
latin:languageCode="ru" latin:languageCode="ru"
@ -152,7 +150,8 @@
</switch> </switch>
<Key <Key
latin:keyStyle="spaceKeyStyle" latin:keyStyle="spaceKeyStyle"
latin:keyWidth="37.454%p" /> latin:keyXPos="31.250%p"
latin:keyWidth="37.500%p" />
<switch> <switch>
<case <case
latin:languageCode="ru" latin:languageCode="ru"
@ -251,7 +250,9 @@
latin:voiceKeyEnabled="true" latin:voiceKeyEnabled="true"
> >
<Key <Key
latin:keyStyle="micKeyStyle" /> latin:keyStyle="micKeyStyle"
latin:keyXPos="-8.047%p"
latin:keyWidth="fillRight" />
</case> </case>
</switch> </switch>
</Row> </Row>

View File

@ -24,12 +24,12 @@
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
<Row <Row
latin:keyWidth="7.520%p" latin:keyWidth="7.579%p"
> >
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="q" latin:keyLabel="q"
@ -65,16 +65,17 @@
latin:keyLabel="å" /> latin:keyLabel="å" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.331%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="7.520%p" latin:keyWidth="7.500%p"
> >
<Key <Key
latin:keyStyle="toSymbolKeyStyle" latin:keyStyle="toSymbolKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="a" latin:keyLabel="a"
@ -108,7 +109,8 @@
latin:popupCharacters="@string/alternates_for_scandinavia_row2_11" /> latin:popupCharacters="@string/alternates_for_scandinavia_row2_11" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="9.331%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include <include

View File

@ -24,12 +24,12 @@
<include <include
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
<Row <Row
latin:keyWidth="8.272%p" latin:keyWidth="8.282%p"
> >
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="q" latin:keyLabel="q"
@ -63,17 +63,18 @@
latin:popupCharacters="@string/alternates_for_p" /> latin:popupCharacters="@string/alternates_for_p" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.331%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include <include
latin:keyboardLayout="@xml/kbd_qwerty_row2" /> latin:keyboardLayout="@xml/kbd_qwerty_row2" />
<Row <Row
latin:keyWidth="8.042%p" latin:keyWidth="8.047%p"
> >
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="15.192%p" latin:keyWidth="13.829%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="y" latin:keyLabel="y"
@ -119,7 +120,8 @@
</switch> </switch>
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="12.530%p" latin:keyXPos="-13.750%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include <include

View File

@ -25,57 +25,49 @@
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
<!-- This row is intentionally not marked as a top row --> <!-- This row is intentionally not marked as a top row -->
<Row <Row
latin:keyWidth="7.520%p" latin:keyWidth="7.579%p"
> >
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="й" latin:keyLabel="й" />
latin:popupCharacters="1" />
<Key <Key
latin:keyLabel="ц" latin:keyLabel="ц" />
latin:popupCharacters="2" />
<Key <Key
latin:keyLabel="у" latin:keyLabel="у" />
latin:popupCharacters="3" />
<Key <Key
latin:keyLabel="к" latin:keyLabel="к" />
latin:popupCharacters="4" />
<Key <Key
latin:keyLabel="е" latin:keyLabel="е"
latin:popupCharacters="@string/alternates_for_cyrillic_e" /> latin:popupCharacters="@string/alternates_for_cyrillic_e" />
<Key <Key
latin:keyLabel="н" latin:keyLabel="н" />
latin:popupCharacters="6" />
<Key <Key
latin:keyLabel="г" latin:keyLabel="г" />
latin:popupCharacters="7" />
<Key <Key
latin:keyLabel="ш" latin:keyLabel="ш" />
latin:popupCharacters="8" />
<Key <Key
latin:keyLabel="щ" latin:keyLabel="щ" />
latin:popupCharacters="9" />
<Key <Key
latin:keyLabel="з" latin:keyLabel="з" />
latin:popupCharacters="0" />
<Key <Key
latin:keyLabel="х" /> latin:keyLabel="х" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.331%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="7.520%p" latin:keyWidth="7.500%p"
> >
<Key <Key
latin:keyStyle="toSymbolKeyStyle" latin:keyStyle="toSymbolKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="9.219%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="ф" /> latin:keyLabel="ф" />
@ -101,11 +93,12 @@
latin:keyLabel="э" /> latin:keyLabel="э" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="9.331%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="7.520%p" latin:keyWidth="7.500%p"
> >
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
@ -138,7 +131,8 @@
latin:popupCharacters="," /> latin:popupCharacters="," />
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="12.400%p" latin:keyXPos="-13.750%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include <include

View File

@ -25,57 +25,48 @@
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
<!-- This row is intentionally not marked as a top row --> <!-- This row is intentionally not marked as a top row -->
<Row <Row
latin:keyWidth="7.520%p" latin:keyWidth="7.579%p"
> >
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="8.640%p" latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="љ" latin:keyLabel="љ" />
latin:popupCharacters="1" />
<Key <Key
latin:keyLabel="њ" latin:keyLabel="њ" />
latin:popupCharacters="2" />
<Key <Key
latin:keyLabel="е" latin:keyLabel="е" />
latin:popupCharacters="3" />
<Key <Key
latin:keyLabel="р" latin:keyLabel="р" />
latin:popupCharacters="4" />
<Key <Key
latin:keyLabel="т" latin:keyLabel="т" />
latin:popupCharacters="5" />
<Key <Key
latin:keyLabel="з" latin:keyLabel="з" />
latin:popupCharacters="6" />
<Key <Key
latin:keyLabel="у" latin:keyLabel="у" />
latin:popupCharacters="7" />
<Key <Key
latin:keyLabel="и" latin:keyLabel="и" />
latin:popupCharacters="8" />
<Key <Key
latin:keyLabel="о" latin:keyLabel="о" />
latin:popupCharacters="9" />
<Key <Key
latin:keyLabel="п" latin:keyLabel="п" />
latin:popupCharacters="0" />
<Key <Key
latin:keyLabel="ш" /> latin:keyLabel="ш" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="8.640%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="7.520%p" latin:keyWidth="7.500%p"
> >
<Key <Key
latin:keyStyle="toSymbolKeyStyle" latin:keyStyle="toSymbolKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="8.640%p" latin:keyWidth="9.219%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="а" /> latin:keyLabel="а" />
@ -101,15 +92,16 @@
latin:keyLabel="ћ" /> latin:keyLabel="ћ" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="8.640%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="7.520%p" latin:keyWidth="7.500%p"
> >
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="8.640%p" latin:keyWidth="9.219%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="ѕ" /> latin:keyLabel="ѕ" />
@ -143,7 +135,8 @@
latin:popupCharacters="\?" /> latin:popupCharacters="\?" />
<Key <Key
latin:keyStyle="shiftKeyStyle" latin:keyStyle="shiftKeyStyle"
latin:keyWidth="8.640%p" latin:keyXPos="-13.750%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include <include

View File

@ -35,12 +35,12 @@
latin:keyboardLayout="@xml/kbd_currency_key_styles" /> latin:keyboardLayout="@xml/kbd_currency_key_styles" />
<!-- This row is intentionally not marked as a top row --> <!-- This row is intentionally not marked as a top row -->
<Row <Row
latin:keyWidth="8.272%p" latin:keyWidth="8.282%p"
> >
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="1" latin:keyLabel="1"
@ -71,16 +71,17 @@
latin:popupCharacters="ⁿ,∅" /> latin:popupCharacters="ⁿ,∅" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.331%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="8.157%p" latin:keyWidth="8.125%p"
> >
<Key <Key
latin:keyStyle="toAlphaKeyStyle" latin:keyStyle="toAlphaKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="11.167%p" latin:keyWidth="11.172%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="#" /> latin:keyLabel="#" />
@ -108,15 +109,16 @@
latin:popupCharacters="],},&gt;" /> latin:popupCharacters="],},&gt;" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="15.750%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="8.042%p" latin:keyWidth="8.047%p"
> >
<Key <Key
latin:keyStyle="moreKeyStyle" latin:keyStyle="moreKeyStyle"
latin:keyWidth="15.192%p" latin:keyWidth="13.829%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="&lt;" latin:keyLabel="&lt;"
@ -180,32 +182,30 @@
</switch> </switch>
<Key <Key
latin:keyStyle="moreKeyStyle" latin:keyStyle="moreKeyStyle"
latin:keyWidth="12.530%p" latin:keyXPos="-13.750%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<!-- This row is intentionally not marked as a bottom row --> <!-- This row is intentionally not marked as a bottom row -->
<Row <Row
latin:keyWidth="8.042%p" latin:keyWidth="8.047%p"
> >
<Spacer
latin:horizontalGap="8.362%p" />
<switch> <switch>
<case latin:hasSettingsKey="true"> <case latin:hasSettingsKey="true">
<Key <Key
latin:keyStyle="settingsKeyStyle" /> latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.047%p" />
</case> </case>
<default>
<Spacer
latin:horizontalGap="8.042%p" />
</default>
</switch> </switch>
<Key <Key
latin:keyLabel="/" /> latin:keyLabel="/"
latin:keyXPos="15.157%p" />
<Key <Key
latin:keyLabel="\@" /> latin:keyLabel="\@" />
<Key <Key
latin:keyStyle="spaceKeyStyle" latin:keyStyle="spaceKeyStyle"
latin:keyWidth="37.454%p" /> latin:keyXPos="31.250%p"
latin:keyWidth="37.500%p" />
<switch> <switch>
<case <case
latin:languageCode="ru" latin:languageCode="ru"
@ -230,7 +230,9 @@
latin:voiceKeyEnabled="true" latin:voiceKeyEnabled="true"
> >
<Key <Key
latin:keyStyle="micKeyStyle" /> latin:keyStyle="micKeyStyle"
latin:keyXPos="-8.047%p"
latin:keyWidth="fillRight" />
</case> </case>
</switch> </switch>
</Row> </Row>

View File

@ -33,12 +33,12 @@
latin:keyboardLayout="@xml/kbd_key_styles" /> latin:keyboardLayout="@xml/kbd_key_styles" />
<!-- This row is intentionally not marked as a top row --> <!-- This row is intentionally not marked as a top row -->
<Row <Row
latin:keyWidth="8.272%p" latin:keyWidth="8.282%p"
> >
<Key <Key
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="7.949%p" latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="~" /> latin:keyLabel="~" />
@ -72,16 +72,17 @@
latin:keyLabel="Δ" /> latin:keyLabel="Δ" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="9.331%p" latin:keyXPos="-9.219%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="8.157%p" latin:keyWidth="8.125%p"
> >
<Key <Key
latin:keyStyle="toAlphaKeyStyle" latin:keyStyle="toAlphaKeyStyle"
latin:keyLabelOption="alignLeft" latin:keyLabelOption="alignLeft"
latin:keyWidth="11.167%p" latin:keyWidth="11.172%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyStyle="nonPasswordSymbolKeyStyle" latin:keyStyle="nonPasswordSymbolKeyStyle"
@ -112,15 +113,16 @@
latin:keyLabel="}" /> latin:keyLabel="}" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="15.750%p" latin:keyXPos="-15.704%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyWidth="8.042%p" latin:keyWidth="8.047%p"
> >
<Key <Key
latin:keyStyle="moreKeyStyle" latin:keyStyle="moreKeyStyle"
latin:keyWidth="15.192%p" latin:keyWidth="13.829%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="\\" /> latin:keyLabel="\\" />
@ -148,34 +150,33 @@
latin:keyLabel="¿" /> latin:keyLabel="¿" />
<Key <Key
latin:keyStyle="moreKeyStyle" latin:keyStyle="moreKeyStyle"
latin:keyWidth="12.530%p" latin:keyXPos="-13.750%p"
latin:keyWidth="fillBoth"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<!-- This row is intentionally not marked as a bottom row --> <!-- This row is intentionally not marked as a bottom row -->
<Row <Row
latin:keyWidth="8.042%p" latin:keyWidth="8.047%p"
> >
<Spacer
latin:horizontalGap="24.446%p" />
<switch> <switch>
<case latin:hasSettingsKey="true"> <case latin:hasSettingsKey="true">
<Key <Key
latin:keyStyle="settingsKeyStyle" /> latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.047%p" />
</case> </case>
<default>
<Spacer
latin:horizontalGap="8.042%p" />
</default>
</switch> </switch>
<Key <Key
latin:keyStyle="spaceKeyStyle" latin:keyStyle="spaceKeyStyle"
latin:keyWidth="37.454%p" /> latin:keyXPos="31.250%p"
latin:keyWidth="37.500%p" />
<switch> <switch>
<case <case
latin:voiceKeyEnabled="true" latin:voiceKeyEnabled="true"
> >
<Key <Key
latin:keyStyle="micKeyStyle" /> latin:keyStyle="micKeyStyle"
latin:keyXPos="-8.047%p"
latin:keyWidth="fillRight" />
</case> </case>
</switch> </switch>
</Row> </Row>

View File

@ -53,6 +53,7 @@
<Key <Key
latin:keyLabel="ج" latin:keyLabel="ج"
latin:popupCharacters="چ" latin:popupCharacters="چ"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -84,6 +85,7 @@
<Key <Key
latin:keyLabel="ك" latin:keyLabel="ك"
latin:popupCharacters="گ" latin:popupCharacters="گ"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -112,7 +114,8 @@
latin:keyLabel="ث" /> latin:keyLabel="ث" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="12%p" latin:keyWidth="fillRight"
latin:visualInsetsLeft="1%p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include latin:keyboardLayout="@xml/kbd_qwerty_row4" /> <include latin:keyboardLayout="@xml/kbd_qwerty_row4" />

View File

@ -68,6 +68,7 @@
latin:keyLabel="p" latin:keyLabel="p"
latin:keyHintIcon="@drawable/key_hint_num0" latin:keyHintIcon="@drawable/key_hint_num0"
latin:popupCharacters="@string/alternates_for_p" latin:popupCharacters="@string/alternates_for_p"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -100,6 +101,7 @@
latin:popupCharacters="@string/alternates_for_l" /> latin:popupCharacters="@string/alternates_for_l" />
<Key <Key
latin:keyLabel="m" latin:keyLabel="m"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -132,7 +134,7 @@
latin:popupCharacters=",,," /> latin:popupCharacters=",,," />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="15%p" latin:keyWidth="fillRight"
latin:visualInsetsLeft="1%p" latin:visualInsetsLeft="1%p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>

View File

@ -29,10 +29,9 @@
<Row <Row
latin:rowEdgeFlags="top" latin:rowEdgeFlags="top"
> >
<Spacer
latin:horizontalGap="5%p" />
<Key <Key
latin:keyLabel="ק" latin:keyLabel="ק"
latin:keyXPos="5%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="ר" /> latin:keyLabel="ר" />
@ -50,7 +49,7 @@
latin:keyLabel="פ" /> latin:keyLabel="פ" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="15%p" latin:keyWidth="fillRight"
latin:visualInsetsLeft="1%p" latin:visualInsetsLeft="1%p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
@ -76,13 +75,13 @@
latin:keyLabel="ך" /> latin:keyLabel="ך" />
<Key <Key
latin:keyLabel="ף" latin:keyLabel="ף"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
<Spacer
latin:horizontalGap="5%p" />
<Key <Key
latin:keyLabel="ז" latin:keyLabel="ז"
latin:keyXPos="5%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="ס" /> latin:keyLabel="ס" />
@ -101,6 +100,7 @@
<Key <Key
latin:keyLabel="ץ" latin:keyLabel="ץ"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
<!-- Here is 5%p space -->
</Row> </Row>
<include latin:keyboardLayout="@xml/kbd_qwerty_row4" /> <include latin:keyboardLayout="@xml/kbd_qwerty_row4" />
</merge> </merge>

View File

@ -51,7 +51,7 @@
<key-style <key-style
latin:styleName="settingsPopupStyle" latin:styleName="settingsPopupStyle"
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="\@drawable/sym_keyboard_settings|\@integer/key_settings" latin:popupCharacters="\@drawable/sym_keyboard_settings_holo|\@integer/key_settings"
latin:parentStyle="functionalKeyStyle" /> latin:parentStyle="functionalKeyStyle" />
</default> </default>
</switch> </switch>
@ -101,20 +101,20 @@
<key-style <key-style
latin:styleName="settingsKeyStyle" latin:styleName="settingsKeyStyle"
latin:code="@integer/key_settings" latin:code="@integer/key_settings"
latin:keyIcon="@drawable/sym_keyboard_settings" latin:keyIcon="@drawable/sym_keyboard_settings_holo"
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" latin:iconPreview="@drawable/sym_keyboard_settings_holo"
latin:parentStyle="functionalKeyStyle" /> latin:parentStyle="functionalKeyStyle" />
<key-style <key-style
latin:styleName="spaceKeyStyle" latin:styleName="spaceKeyStyle"
latin:code="@integer/key_space" latin:code="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space" latin:keyIcon="@drawable/sym_keyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space" latin:iconPreview="@drawable/sym_keyboard_space"
latin:parentStyle="functionalKeyStyle" /> latin:parentStyle="functionalKeyStyle" />
<key-style <key-style
latin:styleName="tabKeyStyle" latin:styleName="tabKeyStyle"
latin:code="@integer/key_tab" latin:code="@integer/key_tab"
latin:keyIcon="@drawable/sym_keyboard_tab" latin:keyIcon="@drawable/sym_keyboard_tab"
latin:iconPreview="@drawable/sym_keyboard_feedback_tab" latin:iconPreview="@drawable/sym_keyboard_tab"
latin:parentStyle="functionalKeyStyle" /> latin:parentStyle="functionalKeyStyle" />
<key-style <key-style
latin:styleName="micKeyStyle" latin:styleName="micKeyStyle"
@ -128,7 +128,7 @@
latin:styleName="nonSpecialBackgroundTabKeyStyle" latin:styleName="nonSpecialBackgroundTabKeyStyle"
latin:code="@integer/key_tab" latin:code="@integer/key_tab"
latin:keyIcon="@drawable/sym_keyboard_tab" latin:keyIcon="@drawable/sym_keyboard_tab"
latin:iconPreview="@drawable/sym_keyboard_feedback_tab" /> latin:iconPreview="@drawable/sym_keyboard_tab" />
</case> </case>
<case <case
latin:colorScheme="black" latin:colorScheme="black"
@ -277,7 +277,7 @@
latin:styleName="returnKeyStyle" latin:styleName="returnKeyStyle"
latin:code="@integer/key_return" latin:code="@integer/key_return"
latin:keyIcon="@drawable/sym_keyboard_return" latin:keyIcon="@drawable/sym_keyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return" latin:iconPreview="@drawable/sym_keyboard_return"
latin:parentStyle="functionalKeyStyle" /> latin:parentStyle="functionalKeyStyle" />
</case> </case>
<case <case

View File

@ -68,21 +68,19 @@
latin:keyStyle="num9KeyStyle" /> latin:keyStyle="num9KeyStyle" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<Spacer <Spacer />
latin:horizontalGap="26.67%p" />
<Key <Key
latin:keyStyle="num0KeyStyle" /> latin:keyStyle="num0KeyStyle" />
<Spacer <Spacer />
latin:horizontalGap="26.67%p" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
</case> </case>
@ -101,7 +99,7 @@
<Key <Key
latin:keyLabel="-" latin:keyLabel="-"
latin:keyStyle="functionalKeyStyle" latin:keyStyle="functionalKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -115,7 +113,7 @@
<Key <Key
latin:keyLabel="," latin:keyLabel=","
latin:keyStyle="functionalKeyStyle" latin:keyStyle="functionalKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -128,7 +126,7 @@
latin:keyLabel="9" /> latin:keyLabel="9" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -143,7 +141,7 @@
latin:keyLabel="." /> latin:keyLabel="." />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
</default> </default>

View File

@ -47,7 +47,7 @@
<Key <Key
latin:keyLabel="-" latin:keyLabel="-"
latin:keyStyle="functionalKeyStyle" latin:keyStyle="functionalKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -61,7 +61,7 @@
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyStyle="functionalKeyStyle" latin:keyStyle="functionalKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -74,7 +74,7 @@
latin:keyStyle="num9KeyStyle" /> latin:keyStyle="num9KeyStyle" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -89,7 +89,7 @@
latin:keyStyle="numSpaceKeyStyle" /> latin:keyStyle="numSpaceKeyStyle" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
</Keyboard> </Keyboard>

View File

@ -47,7 +47,7 @@
<Key <Key
latin:keyLabel="-" latin:keyLabel="-"
latin:keyStyle="functionalKeyStyle" latin:keyStyle="functionalKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -64,7 +64,7 @@
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyStyle="functionalKeyStyle" latin:keyStyle="functionalKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -79,7 +79,7 @@
latin:keyStyle="numPoundKeyStyle" /> latin:keyStyle="numPoundKeyStyle" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -95,7 +95,7 @@
latin:keyStyle="numSpaceKeyStyle" /> latin:keyStyle="numSpaceKeyStyle" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="20%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
</Keyboard> </Keyboard>

View File

@ -66,6 +66,7 @@
latin:keyLabel="p" latin:keyLabel="p"
latin:keyHintIcon="@drawable/key_hint_num0" latin:keyHintIcon="@drawable/key_hint_num0"
latin:popupCharacters="@string/alternates_for_p" latin:popupCharacters="@string/alternates_for_p"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
</merge> </merge>

View File

@ -24,11 +24,10 @@
<Row <Row
latin:keyWidth="10%p" latin:keyWidth="10%p"
> >
<Spacer
latin:horizontalGap="5%p" />
<Key <Key
latin:keyLabel="a" latin:keyLabel="a"
latin:popupCharacters="@string/alternates_for_a" latin:popupCharacters="@string/alternates_for_a"
latin:keyXPos="5%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="s" latin:keyLabel="s"
@ -52,5 +51,6 @@
latin:keyLabel="l" latin:keyLabel="l"
latin:popupCharacters="@string/alternates_for_l" latin:popupCharacters="@string/alternates_for_l"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
<!-- Here is 5%p space -->
</Row> </Row>
</merge> </merge>

View File

@ -49,7 +49,7 @@
latin:keyLabel="m" /> latin:keyLabel="m" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="15%p" latin:keyWidth="fillBoth"
latin:visualInsetsLeft="1%p" latin:visualInsetsLeft="1%p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>

View File

@ -26,54 +26,6 @@
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<switch> <switch>
<case
latin:hasSettingsKey="false"
>
<Key
latin:keyStyle="toSymbolKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<include
latin:keyboardLayout="@xml/kbd_qwerty_f1" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="40%p" />
<switch>
<case
latin:webInput="true"
>
<Key
latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_web_tab_punctuation"
latin:maxPopupKeyboardColumn="8"
latin:keyStyle="tabKeyStyle" />
</case>
<default>
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" />
</default>
</switch>
<switch>
<case
latin:mode="im"
>
<Key
latin:keyStyle="smileyKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</case>
<default>
<Key
latin:keyStyle="returnKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</default>
</switch>
</case>
<case <case
latin:hasSettingsKey="true" latin:hasSettingsKey="true"
> >
@ -88,42 +40,54 @@
<Key <Key
latin:keyStyle="spaceKeyStyle" latin:keyStyle="spaceKeyStyle"
latin:keyWidth="30%p" /> latin:keyWidth="30%p" />
<switch>
<case
latin:webInput="true"
>
<Key
latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_web_tab_punctuation"
latin:maxPopupKeyboardColumn="8"
latin:keyStyle="tabKeyStyle" />
</case>
<default>
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" />
</default>
</switch>
<switch>
<case
latin:mode="im"
>
<Key
latin:keyStyle="smileyKeyStyle"
latin:keyWidth="25%p"
latin:keyEdgeFlags="right" />
</case>
<default>
<Key
latin:keyStyle="returnKeyStyle"
latin:keyWidth="25%p"
latin:keyEdgeFlags="right" />
</default>
</switch>
</case> </case>
<!-- latin:hasSettingsKey="false" -->
<default>
<Key
latin:keyStyle="toSymbolKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<include
latin:keyboardLayout="@xml/kbd_qwerty_f1" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="40%p" />
</default>
</switch>
<switch>
<case
latin:webInput="true"
>
<Key
latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_web_tab_punctuation"
latin:maxPopupKeyboardColumn="8"
latin:keyStyle="tabKeyStyle" />
</case>
<default>
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" />
</default>
</switch>
<switch>
<case
latin:mode="im"
>
<Key
latin:keyStyle="smileyKeyStyle"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" />
</case>
<default>
<Key
latin:keyStyle="returnKeyStyle"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" />
</default>
</switch> </switch>
</Row> </Row>
</merge> </merge>

View File

@ -71,7 +71,7 @@
latin:popupCharacters="@string/alternates_for_p" /> latin:popupCharacters="@string/alternates_for_p" />
<Key <Key
latin:keyLabel="å" latin:keyLabel="å"
latin:keyWidth="8.75%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -109,7 +109,7 @@
<Key <Key
latin:keyLabel="@string/keylabel_for_scandinavia_row2_11" latin:keyLabel="@string/keylabel_for_scandinavia_row2_11"
latin:popupCharacters="@string/alternates_for_scandinavia_row2_11" latin:popupCharacters="@string/alternates_for_scandinavia_row2_11"
latin:keyWidth="8.75%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include <include

View File

@ -68,6 +68,7 @@
latin:keyLabel="p" latin:keyLabel="p"
latin:keyHintIcon="@drawable/key_hint_num0" latin:keyHintIcon="@drawable/key_hint_num0"
latin:popupCharacters="@string/alternates_for_p" latin:popupCharacters="@string/alternates_for_p"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include <include
@ -100,7 +101,7 @@
latin:keyLabel="m" /> latin:keyLabel="m" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="15%p" latin:keyWidth="fillRight"
latin:visualInsetsLeft="1%p" latin:visualInsetsLeft="1%p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>

View File

@ -71,7 +71,7 @@
latin:popupCharacters="0" /> latin:popupCharacters="0" />
<Key <Key
latin:keyLabel="х" latin:keyLabel="х"
latin:keyWidth="8.75%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -101,7 +101,7 @@
latin:keyLabel="ж" /> latin:keyLabel="ж" />
<Key <Key
latin:keyLabel="э" latin:keyLabel="э"
latin:keyWidth="8.75%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -132,7 +132,7 @@
latin:keyLabel="ю" /> latin:keyLabel="ю" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="11.75%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include <include

View File

@ -70,6 +70,7 @@
latin:popupCharacters="0" /> latin:popupCharacters="0" />
<Key <Key
latin:keyLabel="ш" latin:keyLabel="ш"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -98,6 +99,7 @@
latin:keyLabel="ч" /> latin:keyLabel="ч" />
<Key <Key
latin:keyLabel="ћ" latin:keyLabel="ћ"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
@ -126,7 +128,7 @@
latin:keyLabel="ж" /> latin:keyLabel="ж" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="11.00%p" latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<include <include

View File

@ -65,6 +65,7 @@
<Key <Key
latin:keyLabel="0" latin:keyLabel="0"
latin:popupCharacters="ⁿ,∅" latin:popupCharacters="ⁿ,∅"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -95,6 +96,7 @@
<Key <Key
latin:keyLabel=")" latin:keyLabel=")"
latin:popupCharacters="],},&gt;" latin:popupCharacters="],},&gt;"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -126,7 +128,7 @@
latin:popupCharacters="¿" /> latin:popupCharacters="¿" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="15%p" latin:keyWidth="fillRight"
latin:visualInsetsLeft="1%p" latin:visualInsetsLeft="1%p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>

View File

@ -22,44 +22,10 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<Row <Row
latin:keyWidth="10%p"
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<switch> <switch>
<case
latin:hasSettingsKey="false"
>
<Key
latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<include
latin:keyboardLayout="@xml/kbd_symbols_f1" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="40%p" />
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" />
<switch>
<case
latin:mode="im"
>
<Key
latin:keyStyle="smileyKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</case>
<default>
<Key
latin:keyStyle="returnKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</default>
</switch>
</case>
<case <case
latin:hasSettingsKey="true" latin:hasSettingsKey="true"
> >
@ -70,33 +36,58 @@
<Key <Key
latin:keyStyle="settingsKeyStyle" /> latin:keyStyle="settingsKeyStyle" />
<include <include
latin:keyboardLayout="@xml/kbd_symbols_f1" /> latin:keyboardLayout="@xml/kbd_qwerty_f1" />
<Key <Key
latin:keyStyle="spaceKeyStyle" latin:keyStyle="spaceKeyStyle"
latin:keyWidth="30%p" /> latin:keyWidth="30%p" />
</case>
<!-- latin:hasSettingsKey="false" -->
<default>
<Key
latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<include
latin:keyboardLayout="@xml/kbd_symbols_f1" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="40%p" />
</default>
</switch>
<switch>
<case
latin:webInput="true"
>
<Key
latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_web_tab_punctuation"
latin:maxPopupKeyboardColumn="8"
latin:keyStyle="tabKeyStyle" />
</case>
<default>
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup" latin:keyHintIcon="@drawable/hint_popup"
latin:popupCharacters="@string/alternates_for_punctuation" latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="7" latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" /> latin:keyStyle="functionalKeyStyle" />
<switch> </default>
<case </switch>
latin:mode="im" <switch>
> <case
<Key latin:mode="im"
latin:keyStyle="smileyKeyStyle" >
latin:keyWidth="25%p" <Key
latin:keyEdgeFlags="right" /> latin:keyStyle="smileyKeyStyle"
</case> latin:keyWidth="fillRight"
<default> latin:keyEdgeFlags="right" />
<Key
latin:keyStyle="returnKeyStyle"
latin:keyWidth="25%p"
latin:keyEdgeFlags="right" />
</default>
</switch>
</case> </case>
<default>
<Key
latin:keyStyle="returnKeyStyle"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" />
</default>
</switch> </switch>
</Row> </Row>
</merge> </merge>

View File

@ -63,6 +63,7 @@
latin:keyLabel="{" /> latin:keyLabel="{" />
<Key <Key
latin:keyLabel="}" latin:keyLabel="}"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -94,6 +95,7 @@
latin:keyLabel="[" /> latin:keyLabel="[" />
<Key <Key
latin:keyLabel="]" latin:keyLabel="]"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row> <Row>
@ -125,7 +127,7 @@
latin:popupCharacters="≥,»," /> latin:popupCharacters="≥,»," />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="15%p" latin:keyWidth="fillRight"
latin:visualInsetsLeft="1%p" latin:visualInsetsLeft="1%p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>

View File

@ -22,43 +22,10 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<Row <Row
latin:keyWidth="10%p"
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<switch> <switch>
<case
latin:hasSettingsKey="false"
>
<Key
latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="„"
latin:popupCharacters="“,”,„,‟,«,»,,,,"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="40%p" />
<Key
latin:keyLabel="…"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
<switch>
<case
latin:mode="im"
>
<Key
latin:keyStyle="smileyKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</case>
<default>
<Key
latin:keyStyle="returnKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</default>
</switch>
</case>
<case <case
latin:hasSettingsKey="true" latin:hasSettingsKey="true"
> >
@ -75,26 +42,50 @@
<Key <Key
latin:keyStyle="spaceKeyStyle" latin:keyStyle="spaceKeyStyle"
latin:keyWidth="30%p" /> latin:keyWidth="30%p" />
</case>
<!-- latin:hasSettingsKey="false" -->
<default>
<Key
latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="„"
latin:popupCharacters="“,”,„,‟,«,»,,,,"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="40%p" />
</default>
</switch>
<switch>
<case
latin:webInput="true"
>
<Key
latin:keyStyle="tabKeyStyle" />
</case>
<default>
<Key <Key
latin:keyLabel="…" latin:keyLabel="…"
latin:keyStyle="nonPasswordFunctionalKeyStyle" /> latin:keyStyle="nonPasswordFunctionalKeyStyle" />
<switch> </default>
<case </switch>
latin:mode="im" <switch>
> <case
<Key latin:mode="im"
latin:keyStyle="smileyKeyStyle" >
latin:keyWidth="25%p" <Key
latin:keyEdgeFlags="right" /> latin:keyStyle="smileyKeyStyle"
</case> latin:keyWidth="fillRight"
<default> latin:keyEdgeFlags="right" />
<Key
latin:keyStyle="returnKeyStyle"
latin:keyWidth="25%p"
latin:keyEdgeFlags="right" />
</default>
</switch>
</case> </case>
<default>
<Key
latin:keyStyle="returnKeyStyle"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" />
</default>
</switch> </switch>
</Row> </Row>
</merge> </merge>

View File

@ -101,6 +101,10 @@ public class Key {
/** Key is enabled and responds on press */ /** Key is enabled and responds on press */
public boolean mEnabled = true; public boolean mEnabled = true;
// keyWidth constants
private static final int KEYWIDTH_FILL_RIGHT = 0;
private static final int KEYWIDTH_FILL_BOTH = -1;
private final static int[] KEY_STATE_NORMAL_ON = { private final static int[] KEY_STATE_NORMAL_ON = {
android.R.attr.state_checkable, android.R.attr.state_checkable,
android.R.attr.state_checked android.R.attr.state_checked
@ -140,7 +144,7 @@ public class Key {
}; };
/** /**
* This constructor is being used only for key in mini popup keyboard. * This constructor is being used only for key in popup mini keyboard.
*/ */
public Key(Resources res, Keyboard keyboard, CharSequence popupCharacter, int x, int y, public Key(Resources res, Keyboard keyboard, CharSequence popupCharacter, int x, int y,
int width, int height, int edgeFlags) { int width, int height, int edgeFlags) {
@ -178,6 +182,7 @@ public class Key {
* @param x the x coordinate of the top-left * @param x the x coordinate of the top-left
* @param y the y coordinate of the top-left * @param y the y coordinate of the top-left
* @param parser the XML parser containing the attributes for this key * @param parser the XML parser containing the attributes for this key
* @param keyStyles active key styles set
*/ */
public Key(Resources res, Row row, int x, int y, XmlResourceParser parser, public Key(Resources res, Row row, int x, int y, XmlResourceParser parser,
KeyStyles keyStyles) { KeyStyles keyStyles) {
@ -185,6 +190,7 @@ public class Key {
final TypedArray keyboardAttr = res.obtainAttributes(Xml.asAttributeSet(parser), final TypedArray keyboardAttr = res.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard); R.styleable.Keyboard);
int keyWidth;
try { try {
mHeight = KeyboardParser.getDimensionOrFraction(keyboardAttr, mHeight = KeyboardParser.getDimensionOrFraction(keyboardAttr,
R.styleable.Keyboard_rowHeight, R.styleable.Keyboard_rowHeight,
@ -192,17 +198,13 @@ public class Key {
mGap = KeyboardParser.getDimensionOrFraction(keyboardAttr, mGap = KeyboardParser.getDimensionOrFraction(keyboardAttr,
R.styleable.Keyboard_horizontalGap, R.styleable.Keyboard_horizontalGap,
mKeyboard.getDisplayWidth(), row.mDefaultHorizontalGap); mKeyboard.getDisplayWidth(), row.mDefaultHorizontalGap);
mWidth = KeyboardParser.getDimensionOrFraction(keyboardAttr, keyWidth = KeyboardParser.getDimensionOrFraction(keyboardAttr,
R.styleable.Keyboard_keyWidth, R.styleable.Keyboard_keyWidth,
mKeyboard.getDisplayWidth(), row.mDefaultWidth) - mGap; mKeyboard.getDisplayWidth(), row.mDefaultWidth);
} finally { } finally {
keyboardAttr.recycle(); keyboardAttr.recycle();
} }
// Horizontal gap is divided equally to both sides of the key.
mX = x + mGap / 2;
mY = y;
final TypedArray keyAttr = res.obtainAttributes(Xml.asAttributeSet(parser), final TypedArray keyAttr = res.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard_Key); R.styleable.Keyboard_Key);
try { try {
@ -216,6 +218,35 @@ public class Key {
style = keyStyles.getEmptyKeyStyle(); style = keyStyles.getEmptyKeyStyle();
} }
final int keyboardWidth = mKeyboard.getDisplayWidth();
int keyXPos = KeyboardParser.getDimensionOrFraction(keyAttr,
R.styleable.Keyboard_Key_keyXPos, keyboardWidth, x);
if (keyXPos < 0) {
// If keyXPos is negative, the actual x-coordinate will be k + keyXPos.
keyXPos += keyboardWidth;
if (keyXPos < x) {
// keyXPos shouldn't be less than x because drawable area for this key starts
// at x. Or, this key will overlaps the adjacent key on its left hand side.
keyXPos = x;
}
}
if (keyWidth == KEYWIDTH_FILL_RIGHT) {
// If keyWidth is zero, the actual key width will be determined to fill out the
// area up to the right edge of the keyboard.
keyWidth = keyboardWidth - keyXPos;
} else if (keyWidth <= KEYWIDTH_FILL_BOTH) {
// If keyWidth is negative, the actual key width will be determined to fill out the
// area between the nearest key on the left hand side and the right edge of the
// keyboard.
keyXPos = x;
keyWidth = keyboardWidth - keyXPos;
}
// Horizontal gap is divided equally to both sides of the key.
mX = keyXPos + mGap / 2;
mY = y;
mWidth = keyWidth - mGap;
final CharSequence[] popupCharacters = style.getTextArray(keyAttr, final CharSequence[] popupCharacters = style.getTextArray(keyAttr,
R.styleable.Keyboard_Key_popupCharacters); R.styleable.Keyboard_Key_popupCharacters);
if (res.getBoolean(R.bool.config_digit_popup_characters_enabled)) { if (res.getBoolean(R.bool.config_digit_popup_characters_enabled)) {

View File

@ -159,7 +159,7 @@ public class KeyboardId {
@Override @Override
public String toString() { public String toString() {
return String.format("[%s.xml %s %s%d %s %s %s %s%s%s%s%s%s]", return String.format("[%s.xml %s %s%d %s %s %s%s%s%s%s%s%s]",
mXmlName, mXmlName,
mLocale, mLocale,
(mOrientation == 1 ? "port" : "land"), mWidth, (mOrientation == 1 ? "port" : "land"), mWidth,

View File

@ -280,7 +280,7 @@ public class KeyboardParser {
if (TAG_KEY.equals(tag)) { if (TAG_KEY.equals(tag)) {
parseKey(parser, row, keys); parseKey(parser, row, keys);
} else if (TAG_SPACER.equals(tag)) { } else if (TAG_SPACER.equals(tag)) {
parseSpacer(parser, keys); parseSpacer(parser, row, keys);
} else if (TAG_INCLUDE.equals(tag)) { } else if (TAG_INCLUDE.equals(tag)) {
parseIncludeRowContent(parser, row, keys); parseIncludeRowContent(parser, row, keys);
} else if (TAG_SWITCH.equals(tag)) { } else if (TAG_SWITCH.equals(tag)) {
@ -327,19 +327,32 @@ public class KeyboardParser {
} }
} }
private void parseSpacer(XmlResourceParser parser, List<Key> keys) private void parseSpacer(XmlResourceParser parser, Row row, List<Key> keys)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
if (keys == null) { if (keys == null) {
checkEndTag(TAG_SPACER, parser); checkEndTag(TAG_SPACER, parser);
} else { } else {
if (DEBUG) Log.d(TAG, String.format("<%s />", TAG_SPACER)); if (DEBUG) Log.d(TAG, String.format("<%s />", TAG_SPACER));
final TypedArray a = mResources.obtainAttributes(Xml.asAttributeSet(parser), final TypedArray keyboardAttr = mResources.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard); R.styleable.Keyboard);
final int gap = getDimensionOrFraction(a, R.styleable.Keyboard_horizontalGap, if (keyboardAttr.hasValue(R.styleable.Keyboard_horizontalGap))
mKeyboard.getDisplayWidth(), 0); throw new IllegalAttribute(parser, "horizontalGap");
a.recycle(); final int defaultWidth = (row != null) ? row.mDefaultWidth : 0;
final int keyWidth = getDimensionOrFraction(keyboardAttr, R.styleable.Keyboard_keyWidth,
mKeyboard.getDisplayWidth(), defaultWidth);
keyboardAttr.recycle();
final TypedArray keyAttr = mResources.obtainAttributes(Xml.asAttributeSet(parser),
R.styleable.Keyboard_Key);
int keyXPos = KeyboardParser.getDimensionOrFraction(keyAttr,
R.styleable.Keyboard_Key_keyXPos, mKeyboard.getDisplayWidth(), mCurrentX);
if (keyXPos < 0) {
// If keyXPos is negative, the actual x-coordinate will be display_width + keyXPos.
keyXPos += mKeyboard.getDisplayWidth();
}
checkEndTag(TAG_SPACER, parser); checkEndTag(TAG_SPACER, parser);
setSpacer(gap); setSpacer(keyXPos, keyWidth);
} }
} }
@ -566,14 +579,14 @@ public class KeyboardParser {
private void startRow(Row row) { private void startRow(Row row) {
mCurrentX = 0; mCurrentX = 0;
setSpacer(mHorizontalEdgesPadding); setSpacer(mCurrentX, mHorizontalEdgesPadding);
mCurrentRow = row; mCurrentRow = row;
} }
private void endRow() { private void endRow() {
if (mCurrentRow == null) if (mCurrentRow == null)
throw new InflateException("orphant end row tag"); throw new InflateException("orphant end row tag");
setSpacer(mHorizontalEdgesPadding); setSpacer(mCurrentX, mHorizontalEdgesPadding);
if (mCurrentX > mMaxRowWidth) if (mCurrentX > mMaxRowWidth)
mMaxRowWidth = mCurrentX; mMaxRowWidth = mCurrentX;
mCurrentY += mCurrentRow.mDefaultHeight; mCurrentY += mCurrentRow.mDefaultHeight;
@ -581,7 +594,7 @@ public class KeyboardParser {
} }
private void endKey(Key key) { private void endKey(Key key) {
mCurrentX += key.mGap + key.mWidth; mCurrentX = key.mX + key.mGap + key.mWidth;
} }
private void endKeyboard(int defaultVerticalGap) { private void endKeyboard(int defaultVerticalGap) {
@ -589,19 +602,23 @@ public class KeyboardParser {
mTotalHeight = mCurrentY - defaultVerticalGap; mTotalHeight = mCurrentY - defaultVerticalGap;
} }
private void setSpacer(int gap) { private void setSpacer(int keyXPos, int width) {
mCurrentX += gap; mCurrentX = keyXPos + width;
} }
public static int getDimensionOrFraction(TypedArray a, int index, int base, int defValue) { public static int getDimensionOrFraction(TypedArray a, int index, int base, int defValue) {
final TypedValue value = a.peekValue(index); final TypedValue value = a.peekValue(index);
if (value == null) if (value == null)
return defValue; return defValue;
if (value.type == TypedValue.TYPE_DIMENSION) { if (value.type == TypedValue.TYPE_FRACTION) {
return a.getDimensionPixelOffset(index, defValue);
} else if (value.type == TypedValue.TYPE_FRACTION) {
// Round it to avoid values like 47.9999 from getting truncated // Round it to avoid values like 47.9999 from getting truncated
return Math.round(a.getFraction(index, base, base, defValue)); return Math.round(a.getFraction(index, base, base, defValue));
} else if (value.type == TypedValue.TYPE_DIMENSION) {
return a.getDimensionPixelOffset(index, defValue);
} else if (value.type >= TypedValue.TYPE_FIRST_INT
&& value.type <= TypedValue.TYPE_LAST_INT) {
// For enum value.
return a.getInt(index, defValue);
} }
return defValue; return defValue;
} }
@ -627,6 +644,13 @@ public class KeyboardParser {
} }
} }
@SuppressWarnings("serial")
private static class IllegalAttribute extends ParseException {
public IllegalAttribute(XmlResourceParser parser, String attribute) {
super("Tag " + parser.getName() + " has illegal attribute " + attribute, parser);
}
}
@SuppressWarnings("serial") @SuppressWarnings("serial")
private static class NonEmptyTag extends ParseException { private static class NonEmptyTag extends ParseException {
public NonEmptyTag(String tag, XmlResourceParser parser) { public NonEmptyTag(String tag, XmlResourceParser parser) {