Remove BIDI mirroring hack from Key
This change also removes isRtlKeyboard attribute from <Keyboard/> Bug: 5948247 Change-Id: I85998f17ae146a4c8cd0f419ab820b746cb8974f
This commit is contained in:
parent
40e9012276
commit
71c695da22
24 changed files with 203 additions and 170 deletions
|
@ -102,8 +102,43 @@
|
|||
<string name="more_keys_for_bullet">♪</string>
|
||||
<!-- \u066d: ARABIC FIVE POINTED STAR -->
|
||||
<string name="more_keys_for_star">★,\u066d</string>
|
||||
<!-- \ufd3e: ORNATE LEFT PARENTHESIS -->
|
||||
<string name="more_keys_for_left_parenthesis">[,{,<,\ufd3e</string>
|
||||
<!-- \ufd3f: ORNATE RIGHT PARENTHESIS -->
|
||||
<string name="more_keys_for_right_parenthesis">],},>,\ufd3f</string>
|
||||
<!-- The all letters need to be mirrored are found at
|
||||
http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt -->
|
||||
<string name="output_text_for_left_parenthesis">)</string>
|
||||
<string name="output_text_for_right_parenthesis">(</string>
|
||||
<!-- \ufd3e: ORNATE LEFT PARENTHESIS
|
||||
\ufd3f: ORNATE RIGHT PARENTHESIS -->
|
||||
<string name="more_keys_for_left_parenthesis">[|],{|},<|>,\ufd3e|\ufd3f</string>
|
||||
<string name="more_keys_for_right_parenthesis">]|[,}|{,>|<,\ufd3f|\ufd3e</string>
|
||||
<string name="output_text_for_less_than">></string>
|
||||
<string name="output_text_for_greater_than"><</string>
|
||||
<!-- \u2264: LESS-THAN OR EQUAL TO
|
||||
\u2265: GREATER-THAN EQUAL TO
|
||||
\u00ab: LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
\u00bb: RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
\u2039: SINGLE LEFT-POINTING ANGLE QUOTATION MARK
|
||||
\u203a: SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
|
||||
The following characters don't need BIDI mirroring.
|
||||
\u2018: LEFT SINGLE QUOTATION MARK
|
||||
\u2019: RIGHT SINGLE QUOTATION MARK
|
||||
\u201a: SINGLE LOW-9 QUOTATION MARK
|
||||
\u201b: SINGLE HIGH-REVERSED-9 QUOTATION MARK
|
||||
\u201c: LEFT DOUBLE QUOTATION MARK
|
||||
\u201d: RIGHT DOUBLE QUOTATION MARK
|
||||
\u201e: DOUBLE LOW-9 QUOTATION MARK
|
||||
\u201f: DOUBLE HIGH-REVERSED-9 QUOTATION MARK -->
|
||||
<string name="more_keys_for_less_than">\u2264|\u2265,\u00ab|\u00bb,\u2039|\u203a</string>
|
||||
<string name="more_keys_for_greater_than">\u2265|\u2264,\u00bb|\u00ab,\u203a|\u2039</string>
|
||||
<string name="output_text_for_left_square_bracket">]</string>
|
||||
<string name="output_text_for_right_square_bracket">[</string>
|
||||
<string name="output_text_for_left_curly_bracket">}</string>
|
||||
<string name="output_text_for_right_curly_bracket">{</string>
|
||||
<!-- Note: Neither DroidSans nor Roboto have a glyph for DOUBLE HIGH-REVERSED-9 QUOTATION MARK. -->
|
||||
<!-- <string name="more_keys_for_double_quote">\u201c,\u201d,\u201e,\u201f,\u00ab,\u00bb</string> -->
|
||||
<!-- The 4-more keys will be displayed in order of "3,1,2,4". -->
|
||||
<string name="more_keys_for_double_quote">\u201d,\u00ab|\u00bb,\u201c,\u00bb|\u00ab</string>
|
||||
<!-- Note: Neither DroidSans nor Roboto have a glyph for DOUBLE HIGH-REVERSED-9 QUOTATION MARK. -->
|
||||
<!-- <string name="more_keys_for_tablet_double_quote">\u201c,\u201d,\u201e,\u201f,\u00ab,\u00bb,\u2018,\u2019,\u201a,\u201b</string> -->
|
||||
<!-- The 8-more keys with maxMoreKeysColumn=4 will be displayed in order of "3,1,2,4|7,5,6,8". -->
|
||||
<string name="more_keys_for_tablet_double_quote">\u201d,\u00ab|\u00bb,\u201c,\u00bb|\u00ab,\u2019,\u201a,\u2018,\u201b</string>
|
||||
</resources>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- The all letters need to be mirrored are found at
|
||||
http://www.unicode.org/Public/6.0.0/ucd/extracted/DerivedBinaryProperties.txt -->
|
||||
http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt -->
|
||||
<!-- Symbols that are suggested between words -->
|
||||
<string name="suggested_punctuations">!,?,\\,,:,;,\u0022,(|),)|(,\u0027,-,/,@,_</string>
|
||||
</resources>
|
||||
|
|
|
@ -20,4 +20,41 @@
|
|||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="more_keys_for_star">★</string>
|
||||
<string name="more_keys_for_plus">±,﬩</string>
|
||||
<!-- The all letters need to be mirrored are found at
|
||||
http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt -->
|
||||
<string name="output_text_for_left_parenthesis">)</string>
|
||||
<string name="output_text_for_right_parenthesis">(</string>
|
||||
<string name="more_keys_for_left_parenthesis">[|],{|},<|></string>
|
||||
<string name="more_keys_for_right_parenthesis">]|[,}|{,>|<</string>
|
||||
<string name="output_text_for_less_than">></string>
|
||||
<string name="output_text_for_greater_than"><</string>
|
||||
<!-- \u2264: LESS-THAN OR EQUAL TO
|
||||
\u2265: GREATER-THAN EQUAL TO
|
||||
\u00ab: LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
\u00bb: RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
\u2039: SINGLE LEFT-POINTING ANGLE QUOTATION MARK
|
||||
\u203a: SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
|
||||
The following characters don't need BIDI mirroring.
|
||||
\u2018: LEFT SINGLE QUOTATION MARK
|
||||
\u2019: RIGHT SINGLE QUOTATION MARK
|
||||
\u201a: SINGLE LOW-9 QUOTATION MARK
|
||||
\u201b: SINGLE HIGH-REVERSED-9 QUOTATION MARK
|
||||
\u201c: LEFT DOUBLE QUOTATION MARK
|
||||
\u201d: RIGHT DOUBLE QUOTATION MARK
|
||||
\u201e: DOUBLE LOW-9 QUOTATION MARK
|
||||
\u201f: DOUBLE HIGH-REVERSED-9 QUOTATION MARK -->
|
||||
<string name="more_keys_for_less_than">\u2264|\u2265,\u00ab|\u00bb,\u2039|\u203a</string>
|
||||
<string name="more_keys_for_greater_than">\u2265|\u2264,\u00bb|\u00ab,\u203a|\u2039</string>
|
||||
<string name="output_text_for_left_square_bracket">]</string>
|
||||
<string name="output_text_for_right_square_bracket">[</string>
|
||||
<string name="output_text_for_left_curly_bracket">}</string>
|
||||
<string name="output_text_for_right_curly_bracket">{</string>
|
||||
<!-- Note: Neither DroidSans nor Roboto have a glyph for DOUBLE HIGH-REVERSED-9 QUOTATION MARK. -->
|
||||
<!-- <string name="more_keys_for_double_quote">\u201c,\u201d,\u201e,\u201f,\u00ab,\u00bb</string> -->
|
||||
<!-- The 4-more keys will be displayed in order of "3,1,2,4". -->
|
||||
<string name="more_keys_for_double_quote">\u201d,\u00ab|\u00bb,\u201c,\u00bb|\u00ab</string>
|
||||
<!-- Note: Neither DroidSans nor Roboto have a glyph for DOUBLE HIGH-REVERSED-9 QUOTATION MARK. -->
|
||||
<!-- <string name="more_keys_for_tablet_double_quote">\u201c,\u201d,\u201e,\u201f,\u00ab,\u00bb,\u2018,\u2019,\u201a,\u201b</string> -->
|
||||
<!-- The 8-more keys with maxMoreKeysColumn=4 will be displayed in order of "3,1,2,4|7,5,6,8". -->
|
||||
<string name="more_keys_for_tablet_double_quote">\u201d,\u00ab|\u00bb,\u201c,\u00bb|\u00ab,\u2019,\u201a,\u2018,\u201b</string>
|
||||
</resources>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- The all letters need to be mirrored are found at
|
||||
http://www.unicode.org/Public/6.0.0/ucd/extracted/DerivedBinaryProperties.txt -->
|
||||
http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt -->
|
||||
<!-- Symbols that are suggested between words -->
|
||||
<string name="suggested_punctuations">!,?,\\,,:,;,\u0022,(|),)|(,\u0027,-,/,@,_</string>
|
||||
</resources>
|
||||
|
|
|
@ -202,8 +202,6 @@
|
|||
<attr name="verticalGap" format="dimension|fraction" />
|
||||
<!-- More keys keyboard layout template -->
|
||||
<attr name="moreKeysTemplate" format="reference" />
|
||||
<!-- True if the keyboard is Right-To-Left -->
|
||||
<attr name="isRtlKeyboard" format="boolean" />
|
||||
<!-- Icon set for key top and key preview. -->
|
||||
<attr name="iconShiftKey" format="reference" />
|
||||
<attr name="iconDeleteKey" format="reference" />
|
||||
|
|
|
@ -112,6 +112,43 @@
|
|||
<string name="more_keys_for_bullet">♪,♥,♠,♦,♣</string>
|
||||
<string name="more_keys_for_star">†,‡,★</string>
|
||||
<string name="more_keys_for_plus">±</string>
|
||||
<!-- The all letters need to be mirrored are found at
|
||||
http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt -->
|
||||
<string name="output_text_for_left_parenthesis">(</string>
|
||||
<string name="output_text_for_right_parenthesis">)</string>
|
||||
<string name="more_keys_for_left_parenthesis">[,{,<</string>
|
||||
<string name="more_keys_for_right_parenthesis">],},></string>
|
||||
<string name="output_text_for_less_than"><</string>
|
||||
<string name="output_text_for_greater_than">></string>
|
||||
<!-- \u2264: LESS-THAN OR EQUAL TO
|
||||
\u2265: GREATER-THAN EQUAL TO
|
||||
\u00ab: LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
\u00bb: RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
\u2039: SINGLE LEFT-POINTING ANGLE QUOTATION MARK
|
||||
\u203a: SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
|
||||
The following characters don't need BIDI mirroring.
|
||||
\u2018: LEFT SINGLE QUOTATION MARK
|
||||
\u2019: RIGHT SINGLE QUOTATION MARK
|
||||
\u201a: SINGLE LOW-9 QUOTATION MARK
|
||||
\u201b: SINGLE HIGH-REVERSED-9 QUOTATION MARK
|
||||
\u201c: LEFT DOUBLE QUOTATION MARK
|
||||
\u201d: RIGHT DOUBLE QUOTATION MARK
|
||||
\u201e: DOUBLE LOW-9 QUOTATION MARK
|
||||
\u201f: DOUBLE HIGH-REVERSED-9 QUOTATION MARK -->
|
||||
<string name="more_keys_for_less_than">\u2264,\u00ab,\u2039</string>
|
||||
<string name="more_keys_for_greater_than">\u2265,\u00bb,\u203a</string>
|
||||
<string name="output_text_for_left_square_bracket">[</string>
|
||||
<string name="output_text_for_right_square_bracket">]</string>
|
||||
<string name="output_text_for_left_curly_bracket">{</string>
|
||||
<string name="output_text_for_right_curly_bracket">}</string>
|
||||
<!-- The 4-more keys will be displayed in order of "3,1,2,4". -->
|
||||
<string name="more_keys_for_single_quote">\u2019,\u201a,\u2018,\u201b</string>
|
||||
<!-- Note: Neither DroidSans nor Roboto have a glyph for DOUBLE HIGH-REVERSED-9 QUOTATION MARK. -->
|
||||
<!-- <string name="more_keys_for_double_quote">\u201c,\u201d,\u201e,\u201f,\u00ab,\u00bb</string> -->
|
||||
<!-- The 4-more keys will be displayed in order of "3,1,2,4". -->
|
||||
<string name="more_keys_for_double_quote">\u201d,\u00ab,\u201c,\u00bb</string>
|
||||
<!-- Note: Neither DroidSans nor Roboto have a glyph for DOUBLE HIGH-REVERSED-9 QUOTATION MARK. -->
|
||||
<!-- <string name="more_keys_for_tablet_double_quote">\u201c,\u201d,\u201e,\u201f,\u00ab,\u00bb,\u2018,\u2019,\u201a,\u201b</string> -->
|
||||
<!-- The 8-more keys with maxMoreKeysColumn=4 will be displayed in order of "3,1,2,4|7,5,6,8". -->
|
||||
<string name="more_keys_for_tablet_double_quote">\u201d,\u00ab,\u201c,\u00bb,\u2019,\u201a,\u2018,\u201b</string>
|
||||
</resources>
|
||||
|
|
|
@ -116,7 +116,10 @@
|
|||
latin:keyLabel="n"
|
||||
latin:moreKeys="@string/more_keys_for_n" />
|
||||
<Key
|
||||
latin:keyLabel="\'" />
|
||||
latin:keyLabel="\'"
|
||||
latin:keyHintLabel=":"
|
||||
latin:moreKeys=":"
|
||||
latin:keyStyle="hasShiftedLetterHintStyle" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_comma_period" />
|
||||
<include
|
||||
|
|
|
@ -95,12 +95,8 @@
|
|||
<Key
|
||||
latin:keyLabel="+"
|
||||
latin:moreKeys="@string/more_keys_for_plus" />
|
||||
<Key
|
||||
latin:keyLabel="("
|
||||
latin:moreKeys="[,{,<" />
|
||||
<Key
|
||||
latin:keyLabel=")"
|
||||
latin:moreKeys="],},>" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_parentheses" />
|
||||
<Key
|
||||
latin:keyStyle="returnKeyStyle"
|
||||
latin:keyXPos="-14.6%p"
|
||||
|
@ -112,12 +108,8 @@
|
|||
<Key
|
||||
latin:keyStyle="toMoreSymbolKeyStyle"
|
||||
latin:keyWidth="10.0%p" />
|
||||
<Key
|
||||
latin:keyLabel="<"
|
||||
latin:moreKeys="≤,«,‹" />
|
||||
<Key
|
||||
latin:keyLabel=">"
|
||||
latin:moreKeys="≥,»,›" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_less_greater" />
|
||||
<Key
|
||||
latin:keyLabel="="
|
||||
latin:moreKeys="≠,≈" />
|
||||
|
@ -126,8 +118,7 @@
|
|||
latin:mode="url"
|
||||
>
|
||||
<Key
|
||||
latin:keyLabel="\'"
|
||||
latin:moreKeys="‘,’,‚,‛" />
|
||||
latin:keyLabel="\'" />
|
||||
</case>
|
||||
<default>
|
||||
<Key
|
||||
|
@ -166,11 +157,10 @@
|
|||
latin:keyStyle="spaceKeyStyle"
|
||||
latin:keyXPos="30.750%p"
|
||||
latin:keyWidth="39.750%p" />
|
||||
<!-- Note: DroidSans doesn't have double-high-reversed-quotation '\u201f' glyph. -->
|
||||
<!-- latin:moreKeys="“,”,„,‟,«,»,‘,’,‚,‛" -->
|
||||
<Key
|
||||
latin:keyLabel="""
|
||||
latin:moreKeys="“,”,«,»,‘,’,‚,‛" />
|
||||
latin:moreKeys="@string/more_keys_for_tablet_double_quote"
|
||||
latin:maxMoreKeysColumn="4" />
|
||||
<Key
|
||||
latin:keyLabel="_" />
|
||||
<Spacer
|
||||
|
|
|
@ -77,10 +77,8 @@
|
|||
<Key
|
||||
latin:keyLabel="±"
|
||||
latin:moreKeys="∞" />
|
||||
<Key
|
||||
latin:keyLabel="{" />
|
||||
<Key
|
||||
latin:keyLabel="}" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_curly_brackets" />
|
||||
<Key
|
||||
latin:keyStyle="returnKeyStyle"
|
||||
latin:keyXPos="-14.6%p"
|
||||
|
@ -102,10 +100,8 @@
|
|||
latin:keyLabel="™" />
|
||||
<Key
|
||||
latin:keyLabel="℅" />
|
||||
<Key
|
||||
latin:keyLabel="[" />
|
||||
<Key
|
||||
latin:keyLabel="]" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_square_brackets" />
|
||||
<Key
|
||||
latin:keyLabel="¡" />
|
||||
<Key
|
||||
|
|
|
@ -124,9 +124,9 @@
|
|||
latin:moreKeys="@string/more_keys_for_n" />
|
||||
<Key
|
||||
latin:keyLabel="\'"
|
||||
latin:keyLabelFlags="hasShiftedLetterHint"
|
||||
latin:keyHintLabel=":"
|
||||
latin:moreKeys=":" />
|
||||
latin:moreKeys=":"
|
||||
latin:keyStyle="hasShiftedLetterHintStyle" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_comma_period" />
|
||||
<Key
|
||||
|
|
|
@ -102,12 +102,8 @@
|
|||
<Key
|
||||
latin:keyLabel="+"
|
||||
latin:moreKeys="@string/more_keys_for_plus" />
|
||||
<Key
|
||||
latin:keyLabel="("
|
||||
latin:moreKeys="[,{,<" />
|
||||
<Key
|
||||
latin:keyLabel=")"
|
||||
latin:moreKeys="],},>" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_parentheses" />
|
||||
<Key
|
||||
latin:keyStyle="returnKeyStyle"
|
||||
latin:keyXPos="-15.704%p"
|
||||
|
@ -119,12 +115,8 @@
|
|||
<Key
|
||||
latin:keyStyle="toMoreSymbolKeyStyle"
|
||||
latin:keyWidth="13.829%p" />
|
||||
<Key
|
||||
latin:keyLabel="<"
|
||||
latin:moreKeys="≤,«,‹" />
|
||||
<Key
|
||||
latin:keyLabel=">"
|
||||
latin:moreKeys="≥,»,›" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_less_greater" />
|
||||
<Key
|
||||
latin:keyLabel="="
|
||||
latin:moreKeys="≠,≈" />
|
||||
|
@ -133,8 +125,7 @@
|
|||
latin:mode="url"
|
||||
>
|
||||
<Key
|
||||
latin:keyLabel="\'"
|
||||
latin:moreKeys="‘,’,‚,‛" />
|
||||
latin:keyLabel="\'" />
|
||||
</case>
|
||||
<default>
|
||||
<Key
|
||||
|
@ -181,11 +172,10 @@
|
|||
latin:keyStyle="spaceKeyStyle"
|
||||
latin:keyXPos="31.250%p"
|
||||
latin:keyWidth="37.500%p" />
|
||||
<!-- Note: DroidSans doesn't have double-high-reversed-quotation '\u201f' glyph. -->
|
||||
<!-- latin:moreKeys="“,”,„,‟,«,»,‘,’,‚,‛" -->
|
||||
<Key
|
||||
latin:keyLabel="""
|
||||
latin:moreKeys="“,”,«,»,‘,’,‚,‛" />
|
||||
latin:moreKeys="@string/more_keys_for_tablet_double_quote"
|
||||
latin:maxMoreKeysColumn="4" />
|
||||
<Key
|
||||
latin:keyLabel="_" />
|
||||
<switch>
|
||||
|
|
|
@ -84,10 +84,8 @@
|
|||
<Key
|
||||
latin:keyLabel="±"
|
||||
latin:moreKeys="∞" />
|
||||
<Key
|
||||
latin:keyLabel="{" />
|
||||
<Key
|
||||
latin:keyLabel="}" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_curly_brackets" />
|
||||
<Key
|
||||
latin:keyStyle="returnKeyStyle"
|
||||
latin:keyXPos="-15.704%p"
|
||||
|
@ -109,10 +107,8 @@
|
|||
latin:keyLabel="™" />
|
||||
<Key
|
||||
latin:keyLabel="℅" />
|
||||
<Key
|
||||
latin:keyLabel="[" />
|
||||
<Key
|
||||
latin:keyLabel="]" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_square_brackets" />
|
||||
<Key
|
||||
latin:keyLabel="¡" />
|
||||
<Key
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
<Keyboard
|
||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||
latin:isRtlKeyboard="true"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rows_arabic" />
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
<Keyboard
|
||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||
latin:isRtlKeyboard="true"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rows_hebrew" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2011, The Android Open Source Project
|
||||
** Copyright 2012, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
|
@ -18,10 +18,13 @@
|
|||
*/
|
||||
-->
|
||||
|
||||
<Keyboard
|
||||
<merge
|
||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||
latin:isRtlKeyboard="true"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rows_symbols" />
|
||||
</Keyboard>
|
||||
<Key
|
||||
latin:keyLabel="{"
|
||||
latin:keyOutputText="@string/output_text_for_left_curly_bracket" />
|
||||
<Key
|
||||
latin:keyLabel="}"
|
||||
latin:keyOutputText="@string/output_text_for_right_curly_bracket" />
|
||||
</merge>
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2011, The Android Open Source Project
|
||||
** Copyright 2012, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
|
@ -18,10 +18,15 @@
|
|||
*/
|
||||
-->
|
||||
|
||||
<Keyboard
|
||||
<merge
|
||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||
latin:isRtlKeyboard="true"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rows_symbols" />
|
||||
</Keyboard>
|
||||
<Key
|
||||
latin:keyLabel="<"
|
||||
latin:keyOutputText="@string/output_text_for_less_than"
|
||||
latin:moreKeys="@string/more_keys_for_less_than" />
|
||||
<Key
|
||||
latin:keyLabel=">"
|
||||
latin:keyOutputText="@string/output_text_for_greater_than"
|
||||
latin:moreKeys="@string/more_keys_for_greater_than" />
|
||||
</merge>
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2011, The Android Open Source Project
|
||||
** Copyright 2012, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
|
@ -18,10 +18,15 @@
|
|||
*/
|
||||
-->
|
||||
|
||||
<Keyboard
|
||||
<merge
|
||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||
latin:isRtlKeyboard="true"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rows_symbols_shift" />
|
||||
</Keyboard>
|
||||
<Key
|
||||
latin:keyLabel="("
|
||||
latin:keyOutputText="@string/output_text_for_left_parenthesis"
|
||||
latin:moreKeys="@string/more_keys_for_left_parenthesis" />
|
||||
<Key
|
||||
latin:keyLabel=")"
|
||||
latin:keyOutputText="@string/output_text_for_right_parenthesis"
|
||||
latin:moreKeys="@string/more_keys_for_right_parenthesis" />
|
||||
</merge>
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2011, The Android Open Source Project
|
||||
** Copyright 2012, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
|
@ -18,10 +18,13 @@
|
|||
*/
|
||||
-->
|
||||
|
||||
<Keyboard
|
||||
<merge
|
||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||
latin:isRtlKeyboard="true"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rows_symbols_shift" />
|
||||
</Keyboard>
|
||||
<Key
|
||||
latin:keyLabel="["
|
||||
latin:keyOutputText="@string/output_text_for_left_square_bracket" />
|
||||
<Key
|
||||
latin:keyLabel="]"
|
||||
latin:keyOutputText="@string/output_text_for_right_square_bracket" />
|
||||
</merge>
|
|
@ -130,9 +130,13 @@
|
|||
<Key
|
||||
latin:keyLabel="n"
|
||||
latin:moreKeys="@string/more_keys_for_n" />
|
||||
<!-- TODO: Introduce a flag, such as strinctMoreKeysOrder, to control moreKeys display
|
||||
order more precisely. -->
|
||||
<!-- This key is close enough to right edge, so that the 4-more keys will be displayed in
|
||||
order of "4,3,1,2". See @string/more_keys_for_single_quote -->
|
||||
<Key
|
||||
latin:keyLabel="\'"
|
||||
latin:moreKeys="‘,’,‚,‛" />
|
||||
latin:moreKeys="\u2018,\u2019,\u201b,\u201a" />
|
||||
<Key
|
||||
latin:keyStyle="deleteKeyStyle"
|
||||
latin:keyWidth="fillRight"
|
||||
|
|
|
@ -93,13 +93,8 @@
|
|||
<Key
|
||||
latin:keyLabel="+"
|
||||
latin:moreKeys="@string/more_keys_for_plus" />
|
||||
<Key
|
||||
latin:keyLabel="("
|
||||
latin:moreKeys="@string/more_keys_for_left_parenthesis" />
|
||||
<Key
|
||||
latin:keyLabel=")"
|
||||
latin:moreKeys="@string/more_keys_for_right_parenthesis"
|
||||
latin:keyWidth="fillRight" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_parentheses" />
|
||||
</Row>
|
||||
<Row
|
||||
latin:keyWidth="10%p"
|
||||
|
@ -111,15 +106,13 @@
|
|||
<Key
|
||||
latin:keyLabel="!"
|
||||
latin:moreKeys="¡" />
|
||||
<!-- Note: Neither DroidSans nor Roboto have a glyph for ‟ Double high-reversed-9 quotation mark U+201F. -->
|
||||
<!-- latin:moreKeys="“,”,„,‟,«,»" -->
|
||||
<Key
|
||||
latin:keyLabel="""
|
||||
latin:moreKeys="“,”,«,»"
|
||||
latin:maxMoreKeysColumn="6" />
|
||||
latin:moreKeys="@string/more_keys_for_double_quote"
|
||||
latin:maxMoreKeysColumn="4" />
|
||||
<Key
|
||||
latin:keyLabel="\'"
|
||||
latin:moreKeys="‘,’,‚,‛" />
|
||||
latin:moreKeys="@string/more_keys_for_single_quote" />
|
||||
<Key
|
||||
latin:keyLabel=":" />
|
||||
<Key
|
||||
|
|
|
@ -46,11 +46,8 @@
|
|||
latin:keyLabel="÷" />
|
||||
<Key
|
||||
latin:keyLabel="×" />
|
||||
<Key
|
||||
latin:keyLabel="{" />
|
||||
<Key
|
||||
latin:keyLabel="}"
|
||||
latin:keyWidth="fillRight" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_curly_brackets" />
|
||||
</Row>
|
||||
<Row
|
||||
latin:keyWidth="10%p"
|
||||
|
@ -74,11 +71,8 @@
|
|||
<Key
|
||||
latin:keyLabel="="
|
||||
latin:moreKeys="≠,≈,∞" />
|
||||
<Key
|
||||
latin:keyLabel="[" />
|
||||
<Key
|
||||
latin:keyLabel="]"
|
||||
latin:keyWidth="fillRight" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_square_brackets" />
|
||||
</Row>
|
||||
<Row
|
||||
latin:keyWidth="10%p"
|
||||
|
@ -98,12 +92,8 @@
|
|||
latin:moreKeys="§" />
|
||||
<Key
|
||||
latin:keyLabel="\\" />
|
||||
<Key
|
||||
latin:keyLabel="<"
|
||||
latin:moreKeys="≤,«,‹" />
|
||||
<Key
|
||||
latin:keyLabel=">"
|
||||
latin:moreKeys="≥,»,›" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_less_greater" />
|
||||
<Key
|
||||
latin:keyStyle="deleteKeyStyle"
|
||||
latin:keyWidth="fillRight"
|
||||
|
|
|
@ -36,8 +36,6 @@ import org.xmlpull.v1.XmlPullParser;
|
|||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Class for describing the position and characteristics of a single key in the keyboard.
|
||||
|
@ -129,45 +127,6 @@ public class Key {
|
|||
/** Key is enabled and responds on press */
|
||||
private boolean mEnabled = true;
|
||||
|
||||
// RTL parenthesis character swapping map.
|
||||
private static final Map<Integer, Integer> sRtlParenthesisMap = new HashMap<Integer, Integer>();
|
||||
|
||||
static {
|
||||
// The all letters need to be mirrored are found at
|
||||
// http://www.unicode.org/Public/6.0.0/ucd/extracted/DerivedBinaryProperties.txt
|
||||
addRtlParenthesisPair('(', ')');
|
||||
addRtlParenthesisPair('[', ']');
|
||||
addRtlParenthesisPair('{', '}');
|
||||
addRtlParenthesisPair('<', '>');
|
||||
// \u00ab: LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
// \u00bb: RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
addRtlParenthesisPair('\u00ab', '\u00bb');
|
||||
// \u2039: SINGLE LEFT-POINTING ANGLE QUOTATION MARK
|
||||
// \u203a: SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
|
||||
addRtlParenthesisPair('\u2039', '\u203a');
|
||||
// \u2264: LESS-THAN OR EQUAL TO
|
||||
// \u2265: GREATER-THAN OR EQUAL TO
|
||||
addRtlParenthesisPair('\u2264', '\u2265');
|
||||
}
|
||||
|
||||
private static void addRtlParenthesisPair(int left, int right) {
|
||||
sRtlParenthesisMap.put(left, right);
|
||||
sRtlParenthesisMap.put(right, left);
|
||||
}
|
||||
|
||||
public static int getRtlParenthesisCode(int code, boolean isRtl) {
|
||||
if (isRtl && sRtlParenthesisMap.containsKey(code)) {
|
||||
return sRtlParenthesisMap.get(code);
|
||||
} else {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
||||
private static int getCode(Resources res, Keyboard.Params params, String moreKeySpec) {
|
||||
return getRtlParenthesisCode(
|
||||
MoreKeySpecParser.getCode(res, moreKeySpec), params.mIsRtlKeyboard);
|
||||
}
|
||||
|
||||
private static Drawable getIcon(Keyboard.Params params, String moreKeySpec) {
|
||||
final int iconAttrId = MoreKeySpecParser.getIconAttrId(moreKeySpec);
|
||||
if (iconAttrId == KeyboardIconsSet.ICON_UNDEFINED) {
|
||||
|
@ -183,7 +142,8 @@ public class Key {
|
|||
public Key(Resources res, Keyboard.Params params, String moreKeySpec,
|
||||
int x, int y, int width, int height) {
|
||||
this(params, MoreKeySpecParser.getLabel(moreKeySpec), null, getIcon(params, moreKeySpec),
|
||||
getCode(res, params, moreKeySpec), MoreKeySpecParser.getOutputText(moreKeySpec),
|
||||
MoreKeySpecParser.getCode(res, moreKeySpec),
|
||||
MoreKeySpecParser.getOutputText(moreKeySpec),
|
||||
x, y, width, height);
|
||||
}
|
||||
|
||||
|
@ -311,16 +271,14 @@ public class Key {
|
|||
if (code == Keyboard.CODE_UNSPECIFIED && TextUtils.isEmpty(outputText)
|
||||
&& !TextUtils.isEmpty(mLabel)) {
|
||||
if (mLabel.codePointCount(0, mLabel.length()) == 1) {
|
||||
final int activatedCode;
|
||||
// Use the first letter of the hint label if shiftedLetterActivated flag is
|
||||
// specified.
|
||||
if (hasShiftedLetterHint() && isShiftedLetterActivated()
|
||||
&& !TextUtils.isEmpty(mHintLabel)) {
|
||||
activatedCode = mHintLabel.codePointAt(0);
|
||||
mCode = mHintLabel.codePointAt(0);
|
||||
} else {
|
||||
activatedCode = mLabel.codePointAt(0);
|
||||
mCode = mLabel.codePointAt(0);
|
||||
}
|
||||
mCode = getRtlParenthesisCode(activatedCode, params.mIsRtlKeyboard);
|
||||
} else {
|
||||
// In some locale and case, the character might be represented by multiple code
|
||||
// points, such as upper case Eszett of German alphabet.
|
||||
|
|
|
@ -121,9 +121,6 @@ public class Keyboard {
|
|||
/** Maximum column for mini keyboard */
|
||||
public final int mMaxMiniKeyboardColumn;
|
||||
|
||||
/** True if Right-To-Left keyboard */
|
||||
public final boolean mIsRtlKeyboard;
|
||||
|
||||
/** List of keys and icons in this keyboard */
|
||||
public final Set<Key> mKeys;
|
||||
public final Set<Key> mShiftKeys;
|
||||
|
@ -140,7 +137,6 @@ public class Keyboard {
|
|||
mOccupiedWidth = params.mOccupiedWidth;
|
||||
mMostCommonKeyHeight = params.mMostCommonKeyHeight;
|
||||
mMostCommonKeyWidth = params.mMostCommonKeyWidth;
|
||||
mIsRtlKeyboard = params.mIsRtlKeyboard;
|
||||
mMoreKeysTemplate = params.mMoreKeysTemplate;
|
||||
mMaxMiniKeyboardColumn = params.mMaxMiniKeyboardColumn;
|
||||
|
||||
|
@ -222,7 +218,6 @@ public class Keyboard {
|
|||
public int mHorizontalGap;
|
||||
public int mVerticalGap;
|
||||
|
||||
public boolean mIsRtlKeyboard;
|
||||
public int mMoreKeysTemplate;
|
||||
public int mMaxMiniKeyboardColumn;
|
||||
|
||||
|
@ -739,8 +734,6 @@ public class Keyboard {
|
|||
R.styleable.Keyboard_rowHeight, params.mBaseHeight,
|
||||
params.mBaseHeight / DEFAULT_KEYBOARD_ROWS);
|
||||
|
||||
params.mIsRtlKeyboard = keyboardAttr.getBoolean(
|
||||
R.styleable.Keyboard_isRtlKeyboard, false);
|
||||
params.mMoreKeysTemplate = keyboardAttr.getResourceId(
|
||||
R.styleable.Keyboard_moreKeysTemplate, 0);
|
||||
params.mMaxMiniKeyboardColumn = keyAttr.getInt(
|
||||
|
|
|
@ -210,7 +210,6 @@ public class MiniKeyboard extends Keyboard {
|
|||
// TODO: Mini keyboard's vertical gap is currently calculated heuristically.
|
||||
// Should revise the algorithm.
|
||||
mParams.mVerticalGap = parentKeyboard.mVerticalGap / 2;
|
||||
mParams.mIsRtlKeyboard = parentKeyboard.mIsRtlKeyboard;
|
||||
mMoreKeys = parentKey.mMoreKeys;
|
||||
|
||||
final int previewWidth = view.mKeyPreviewDrawParams.mPreviewBackgroundWidth;
|
||||
|
|
Loading…
Reference in a new issue