Support additional more keys for keyboard layout test
Bug: 13017434 Change-Id: I44c31dce3391d9638979539bb5e58c0525186fb4main
parent
6674449ac2
commit
0dabae720a
|
@ -61,16 +61,16 @@ public final class Azerty extends LayoutBase {
|
|||
|
||||
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
|
||||
.setKeysOfRow(1,
|
||||
key("a", moreKey("1")),
|
||||
key("z", moreKey("2")),
|
||||
key("e", moreKey("3")),
|
||||
key("r", moreKey("4")),
|
||||
key("t", moreKey("5")),
|
||||
key("y", moreKey("6")),
|
||||
key("u", moreKey("7")),
|
||||
key("i", moreKey("8")),
|
||||
key("o", moreKey("9")),
|
||||
key("p", moreKey("0")))
|
||||
key("a", additionalMoreKey("1")),
|
||||
key("z", additionalMoreKey("2")),
|
||||
key("e", additionalMoreKey("3")),
|
||||
key("r", additionalMoreKey("4")),
|
||||
key("t", additionalMoreKey("5")),
|
||||
key("y", additionalMoreKey("6")),
|
||||
key("u", additionalMoreKey("7")),
|
||||
key("i", additionalMoreKey("8")),
|
||||
key("o", additionalMoreKey("9")),
|
||||
key("p", additionalMoreKey("0")))
|
||||
.setKeysOfRow(2, "q", "s", "d", "f", "g", "h", "j", "k", "l", "m")
|
||||
.setKeysOfRow(3, "w", "x", "c", "v", "b", "n", ROW3_QUOTE)
|
||||
.build();
|
||||
|
|
|
@ -77,29 +77,29 @@ public final class Bulgarian extends LayoutBase {
|
|||
key("\u043F", moreKey("0")),
|
||||
// U+0447: "ч" CYRILLIC SMALL LETTER CHE
|
||||
"\u0447")
|
||||
// U+0430: "а" CYRILLIC SMALL LETTER A
|
||||
// U+0441: "с" CYRILLIC SMALL LETTER ES
|
||||
// U+0434: "д" CYRILLIC SMALL LETTER DE
|
||||
// U+0444: "ф" CYRILLIC SMALL LETTER EF
|
||||
// U+0433: "г" CYRILLIC SMALL LETTER GHE
|
||||
// U+0445: "х" CYRILLIC SMALL LETTER HA
|
||||
// U+0439: "й" CYRILLIC SMALL LETTER SHORT I
|
||||
// U+043A: "к" CYRILLIC SMALL LETTER KA
|
||||
// U+043B: "л" CYRILLIC SMALL LETTER EL
|
||||
// U+0448: "ш" CYRILLIC SMALL LETTER SHA
|
||||
// U+0449: "щ" CYRILLIC SMALL LETTER SHCHA
|
||||
.setKeysOfRow(2,
|
||||
// U+0430: "а" CYRILLIC SMALL LETTER A
|
||||
// U+0441: "с" CYRILLIC SMALL LETTER ES
|
||||
// U+0434: "д" CYRILLIC SMALL LETTER DE
|
||||
// U+0444: "ф" CYRILLIC SMALL LETTER EF
|
||||
// U+0433: "г" CYRILLIC SMALL LETTER GHE
|
||||
// U+0445: "х" CYRILLIC SMALL LETTER HA
|
||||
// U+0439: "й" CYRILLIC SMALL LETTER SHORT I
|
||||
// U+043A: "к" CYRILLIC SMALL LETTER KA
|
||||
// U+043B: "л" CYRILLIC SMALL LETTER EL
|
||||
// U+0448: "ш" CYRILLIC SMALL LETTER SHA
|
||||
// U+0449: "щ" CYRILLIC SMALL LETTER SHCHA
|
||||
"\u0430", "\u0441", "\u0434", "\u0444", "\u0433", "\u0445", "\u0439", "\u043A",
|
||||
"\u043B", "\u0448", "\u0449")
|
||||
// U+0437: "з" CYRILLIC SMALL LETTER ZE
|
||||
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
// U+0446: "ц" CYRILLIC SMALL LETTER TSE
|
||||
// U+0436: "ж" CYRILLIC SMALL LETTER ZHE
|
||||
// U+0431: "б" CYRILLIC SMALL LETTER BE
|
||||
// U+043D: "н" CYRILLIC SMALL LETTER EN
|
||||
// U+043C: "м" CYRILLIC SMALL LETTER EM
|
||||
// U+044E: "ю" CYRILLIC SMALL LETTER YU
|
||||
.setKeysOfRow(3,
|
||||
// U+0437: "з" CYRILLIC SMALL LETTER ZE
|
||||
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
// U+0446: "ц" CYRILLIC SMALL LETTER TSE
|
||||
// U+0436: "ж" CYRILLIC SMALL LETTER ZHE
|
||||
// U+0431: "б" CYRILLIC SMALL LETTER BE
|
||||
// U+043D: "н" CYRILLIC SMALL LETTER EN
|
||||
// U+043C: "м" CYRILLIC SMALL LETTER EM
|
||||
// U+044E: "ю" CYRILLIC SMALL LETTER YU
|
||||
"\u0437", "\u044C", "\u0446", "\u0436", "\u0431", "\u043D", "\u043C", "\u044E")
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -67,30 +67,30 @@ public final class BulgarianBds extends LayoutBase {
|
|||
key("\u0446", moreKey("0")),
|
||||
// U+0431: "б" CYRILLIC SMALL LETTER BE
|
||||
"\u0431")
|
||||
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
// U+044F: "я" CYRILLIC SMALL LETTER YA
|
||||
// U+0430: "а" CYRILLIC SMALL LETTER A
|
||||
// U+043E: "о" CYRILLIC SMALL LETTER O
|
||||
// U+0436: "ж" CYRILLIC SMALL LETTER ZHE
|
||||
// U+0433: "г" CYRILLIC SMALL LETTER GHE
|
||||
// U+0442: "т" CYRILLIC SMALL LETTER TE
|
||||
// U+043D: "н" CYRILLIC SMALL LETTER EN
|
||||
// U+0432: "в" CYRILLIC SMALL LETTER VE
|
||||
// U+043C: "м" CYRILLIC SMALL LETTER EM
|
||||
// U+0447: "ч" CYRILLIC SMALL LETTER CHE
|
||||
.setKeysOfRow(2,
|
||||
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
// U+044F: "я" CYRILLIC SMALL LETTER YA
|
||||
// U+0430: "а" CYRILLIC SMALL LETTER A
|
||||
// U+043E: "о" CYRILLIC SMALL LETTER O
|
||||
// U+0436: "ж" CYRILLIC SMALL LETTER ZHE
|
||||
// U+0433: "г" CYRILLIC SMALL LETTER GHE
|
||||
// U+0442: "т" CYRILLIC SMALL LETTER TE
|
||||
// U+043D: "н" CYRILLIC SMALL LETTER EN
|
||||
// U+0432: "в" CYRILLIC SMALL LETTER VE
|
||||
// U+043C: "м" CYRILLIC SMALL LETTER EM
|
||||
// U+0447: "ч" CYRILLIC SMALL LETTER CHE
|
||||
"\u044C", "\u044F", "\u0430", "\u043E", "\u0436", "\u0433", "\u0442", "\u043D",
|
||||
"\u0432", "\u043C", "\u0447")
|
||||
// U+044E: "ю" CYRILLIC SMALL LETTER YU
|
||||
// U+0439: "й" CYRILLIC SMALL LETTER SHORT I
|
||||
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
|
||||
// U+044D: "э" CYRILLIC SMALL LETTER E
|
||||
// U+0444: "ф" CYRILLIC SMALL LETTER EF
|
||||
// U+0445: "х" CYRILLIC SMALL LETTER HA
|
||||
// U+043F: "п" CYRILLIC SMALL LETTER PE
|
||||
// U+0440: "р" CYRILLIC SMALL LETTER ER
|
||||
// U+043B: "л" CYRILLIC SMALL LETTER EL
|
||||
.setKeysOfRow(3,
|
||||
// U+044E: "ю" CYRILLIC SMALL LETTER YU
|
||||
// U+0439: "й" CYRILLIC SMALL LETTER SHORT I
|
||||
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
|
||||
// U+044D: "э" CYRILLIC SMALL LETTER E
|
||||
// U+0444: "ф" CYRILLIC SMALL LETTER EF
|
||||
// U+0445: "х" CYRILLIC SMALL LETTER HA
|
||||
// U+043F: "п" CYRILLIC SMALL LETTER PE
|
||||
// U+0440: "р" CYRILLIC SMALL LETTER ER
|
||||
// U+043B: "л" CYRILLIC SMALL LETTER EL
|
||||
"\u044E", "\u0439", "\u044A", "\u044D", "\u0444", "\u0445", "\u043F", "\u0440",
|
||||
"\u043B")
|
||||
.build();
|
||||
|
|
|
@ -63,47 +63,47 @@ public final class EastSlavic extends LayoutBase {
|
|||
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
|
||||
.setKeysOfRow(1,
|
||||
// U+0443: "у" CYRILLIC SMALL LETTER U
|
||||
key("\u0439", moreKey("1")),
|
||||
key("\u0439", additionalMoreKey("1")),
|
||||
// U+0446: "ц" CYRILLIC SMALL LETTER TSE
|
||||
key("\u0446", moreKey("2")),
|
||||
key("\u0446", additionalMoreKey("2")),
|
||||
// U+0439: "й" CYRILLIC SMALL LETTER SHORT I
|
||||
key("\u0443", moreKey("3")),
|
||||
key("\u0443", additionalMoreKey("3")),
|
||||
// U+043A: "к" CYRILLIC SMALL LETTER KA
|
||||
key("\u043A", moreKey("4")),
|
||||
key("\u043A", additionalMoreKey("4")),
|
||||
// U+0435: "е" CYRILLIC SMALL LETTER IE
|
||||
key("\u0435", moreKey("5")),
|
||||
key("\u0435", additionalMoreKey("5")),
|
||||
// U+043D: "н" CYRILLIC SMALL LETTER EN
|
||||
key("\u043D", moreKey("6")),
|
||||
key("\u043D", additionalMoreKey("6")),
|
||||
// U+0433: "г" CYRILLIC SMALL LETTER GHE
|
||||
key("\u0433", moreKey("7")),
|
||||
key("\u0433", additionalMoreKey("7")),
|
||||
// U+0448: "ш" CYRILLIC SMALL LETTER SHA
|
||||
key("\u0448", moreKey("8")),
|
||||
key(ROW1_9, moreKey("9")),
|
||||
key("\u0448", additionalMoreKey("8")),
|
||||
key(ROW1_9, additionalMoreKey("9")),
|
||||
// U+0437: "з" CYRILLIC SMALL LETTER ZE
|
||||
key("\u0437", moreKey("0")),
|
||||
key("\u0437", additionalMoreKey("0")),
|
||||
// U+0445: "х" CYRILLIC SMALL LETTER HA
|
||||
"\u0445")
|
||||
// U+0444: "ф" CYRILLIC SMALL LETTER EF
|
||||
// U+0432: "в" CYRILLIC SMALL LETTER VE
|
||||
// U+0430: "а" CYRILLIC SMALL LETTER A
|
||||
// U+043F: "п" CYRILLIC SMALL LETTER PE
|
||||
// U+0440: "р" CYRILLIC SMALL LETTER ER
|
||||
// U+043E: "о" CYRILLIC SMALL LETTER O
|
||||
// U+043B: "л" CYRILLIC SMALL LETTER EL
|
||||
// U+0434: "д" CYRILLIC SMALL LETTER DE
|
||||
// U+0436: "ж" CYRILLIC SMALL LETTER ZHE
|
||||
.setKeysOfRow(2,
|
||||
// U+0444: "ф" CYRILLIC SMALL LETTER EF
|
||||
// U+0432: "в" CYRILLIC SMALL LETTER VE
|
||||
// U+0430: "а" CYRILLIC SMALL LETTER A
|
||||
// U+043F: "п" CYRILLIC SMALL LETTER PE
|
||||
// U+0440: "р" CYRILLIC SMALL LETTER ER
|
||||
// U+043E: "о" CYRILLIC SMALL LETTER O
|
||||
// U+043B: "л" CYRILLIC SMALL LETTER EL
|
||||
// U+0434: "д" CYRILLIC SMALL LETTER DE
|
||||
// U+0436: "ж" CYRILLIC SMALL LETTER ZHE
|
||||
"\u0444", ROW2_2, "\u0432", "\u0430", "\u043F", "\u0440", "\u043E", "\u043B",
|
||||
"\u0434", "\u0436", ROW2_11)
|
||||
// U+044F: "я" CYRILLIC SMALL LETTER YA
|
||||
// U+0447: "ч" CYRILLIC SMALL LETTER CHE
|
||||
// U+0441: "с" CYRILLIC SMALL LETTER ES
|
||||
// U+043C: "м" CYRILLIC SMALL LETTER EM
|
||||
// U+0442: "т" CYRILLIC SMALL LETTER TE
|
||||
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
// U+0431: "б" CYRILLIC SMALL LETTER BE
|
||||
// U+044E: "ю" CYRILLIC SMALL LETTER YU
|
||||
.setKeysOfRow(3,
|
||||
// U+044F: "я" CYRILLIC SMALL LETTER YA
|
||||
// U+0447: "ч" CYRILLIC SMALL LETTER CHE
|
||||
// U+0441: "с" CYRILLIC SMALL LETTER ES
|
||||
// U+043C: "м" CYRILLIC SMALL LETTER EM
|
||||
// U+0442: "т" CYRILLIC SMALL LETTER TE
|
||||
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
// U+0431: "б" CYRILLIC SMALL LETTER BE
|
||||
// U+044E: "ю" CYRILLIC SMALL LETTER YU
|
||||
"\u044F", "\u0447", "\u0441", "\u043C", ROW3_5, "\u0442", "\u044C", "\u0431",
|
||||
"\u044E")
|
||||
.build();
|
||||
|
|
|
@ -36,7 +36,7 @@ public final class Greek extends LayoutBase {
|
|||
@Override
|
||||
public String getName() { return LAYOUT_NAME; }
|
||||
|
||||
public static class GreekCustomizer extends EuroLayoutCustomizer {
|
||||
public static class GreekCustomizer extends EuroCustomizer {
|
||||
public GreekCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
|
|
|
@ -188,8 +188,8 @@ public abstract class LayoutBase extends AbstractLayoutBase {
|
|||
/**
|
||||
* The layout customize class for countries that use Euro.
|
||||
*/
|
||||
public static class EuroLayoutCustomizer extends LayoutCustomizer {
|
||||
public EuroLayoutCustomizer(final Locale locale) {
|
||||
public static class EuroCustomizer extends LayoutCustomizer {
|
||||
public EuroCustomizer(final Locale locale) {
|
||||
super(locale);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,16 +41,16 @@ public final class Nordic extends LayoutBase {
|
|||
|
||||
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
|
||||
.setKeysOfRow(1,
|
||||
key("q", moreKey("1")),
|
||||
key("w", moreKey("2")),
|
||||
key("e", moreKey("3")),
|
||||
key("r", moreKey("4")),
|
||||
key("t", moreKey("5")),
|
||||
key("y", moreKey("6")),
|
||||
key("u", moreKey("7")),
|
||||
key("i", moreKey("8")),
|
||||
key("o", moreKey("9")),
|
||||
key("p", moreKey("0")),
|
||||
key("q", additionalMoreKey("1")),
|
||||
key("w", additionalMoreKey("2")),
|
||||
key("e", additionalMoreKey("3")),
|
||||
key("r", additionalMoreKey("4")),
|
||||
key("t", additionalMoreKey("5")),
|
||||
key("y", additionalMoreKey("6")),
|
||||
key("u", additionalMoreKey("7")),
|
||||
key("i", additionalMoreKey("8")),
|
||||
key("o", additionalMoreKey("9")),
|
||||
key("p", additionalMoreKey("0")),
|
||||
ROW1_11)
|
||||
.setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10, ROW2_11)
|
||||
.setKeysOfRow(3, "z", "x", "c", "v", "b", "n", "m")
|
||||
|
|
|
@ -37,16 +37,16 @@ public final class Qwerty extends LayoutBase {
|
|||
|
||||
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
|
||||
.setKeysOfRow(1,
|
||||
key("q", moreKey("1")),
|
||||
key("w", moreKey("2")),
|
||||
key("e", moreKey("3")),
|
||||
key("r", moreKey("4")),
|
||||
key("t", moreKey("5")),
|
||||
key("y", moreKey("6")),
|
||||
key("u", moreKey("7")),
|
||||
key("i", moreKey("8")),
|
||||
key("o", moreKey("9")),
|
||||
key("p", moreKey("0")))
|
||||
key("q", additionalMoreKey("1")),
|
||||
key("w", additionalMoreKey("2")),
|
||||
key("e", additionalMoreKey("3")),
|
||||
key("r", additionalMoreKey("4")),
|
||||
key("t", additionalMoreKey("5")),
|
||||
key("y", additionalMoreKey("6")),
|
||||
key("u", additionalMoreKey("7")),
|
||||
key("i", additionalMoreKey("8")),
|
||||
key("o", additionalMoreKey("9")),
|
||||
key("p", additionalMoreKey("0")))
|
||||
.setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l")
|
||||
.setKeysOfRow(3, "z", "x", "c", "v", "b", "n", "m")
|
||||
.build();
|
||||
|
|
|
@ -34,16 +34,16 @@ public final class Qwertz extends LayoutBase {
|
|||
|
||||
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
|
||||
.setKeysOfRow(1,
|
||||
key("q", moreKey("1")),
|
||||
key("w", moreKey("2")),
|
||||
key("e", moreKey("3")),
|
||||
key("r", moreKey("4")),
|
||||
key("t", moreKey("5")),
|
||||
key("z", moreKey("6")),
|
||||
key("u", moreKey("7")),
|
||||
key("i", moreKey("8")),
|
||||
key("o", moreKey("9")),
|
||||
key("p", moreKey("0")))
|
||||
key("q", additionalMoreKey("1")),
|
||||
key("w", additionalMoreKey("2")),
|
||||
key("e", additionalMoreKey("3")),
|
||||
key("r", additionalMoreKey("4")),
|
||||
key("t", additionalMoreKey("5")),
|
||||
key("z", additionalMoreKey("6")),
|
||||
key("u", additionalMoreKey("7")),
|
||||
key("i", additionalMoreKey("8")),
|
||||
key("o", additionalMoreKey("9")),
|
||||
key("p", additionalMoreKey("0")))
|
||||
.setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l")
|
||||
.setKeysOfRow(3, "y", "x", "c", "v", "b", "n", "m")
|
||||
.build();
|
||||
|
|
|
@ -63,24 +63,24 @@ public final class SouthSlavic extends LayoutBase {
|
|||
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
|
||||
.setKeysOfRow(1,
|
||||
// U+0459: "љ" CYRILLIC SMALL LETTER LJE
|
||||
key("\u0459", moreKey("1")),
|
||||
key("\u0459", additionalMoreKey("1")),
|
||||
// U+045A: "њ" CYRILLIC SMALL LETTER NJE
|
||||
key("\u045A", moreKey("2")),
|
||||
key("\u045A", additionalMoreKey("2")),
|
||||
// U+0435: "е" CYRILLIC SMALL LETTER IE
|
||||
key("\u0435", moreKey("3")),
|
||||
key("\u0435", additionalMoreKey("3")),
|
||||
// U+0440: "р" CYRILLIC SMALL LETTER ER
|
||||
key("\u0440", moreKey("4")),
|
||||
key("\u0440", additionalMoreKey("4")),
|
||||
// U+0442: "т" CYRILLIC SMALL LETTER TE
|
||||
key("\u0442", moreKey("5")),
|
||||
key(ROW1_6, moreKey("6")),
|
||||
key("\u0442", additionalMoreKey("5")),
|
||||
key(ROW1_6, additionalMoreKey("6")),
|
||||
// U+0443: "у" CYRILLIC SMALL LETTER U
|
||||
key("\u0443", moreKey("7")),
|
||||
key("\u0443", additionalMoreKey("7")),
|
||||
// U+0438: "и" CYRILLIC SMALL LETTER I
|
||||
key("\u0438", moreKey("8")),
|
||||
key("\u0438", additionalMoreKey("8")),
|
||||
// U+043E: "о" CYRILLIC SMALL LETTER O
|
||||
key("\u043E", moreKey("9")),
|
||||
key("\u043E", additionalMoreKey("9")),
|
||||
// U+043F: "п" CYRILLIC SMALL LETTER PE
|
||||
key("\u043F", moreKey("0")),
|
||||
key("\u043F", additionalMoreKey("0")),
|
||||
// U+0448: "ш" CYRILLIC SMALL LETTER SHA
|
||||
"\u0448")
|
||||
.setKeysOfRow(2,
|
||||
|
|
|
@ -36,16 +36,16 @@ public final class Spanish extends LayoutBase {
|
|||
|
||||
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
|
||||
.setKeysOfRow(1,
|
||||
key("q", moreKey("1")),
|
||||
key("w", moreKey("2")),
|
||||
key("e", moreKey("3")),
|
||||
key("r", moreKey("4")),
|
||||
key("t", moreKey("5")),
|
||||
key("y", moreKey("6")),
|
||||
key("u", moreKey("7")),
|
||||
key("i", moreKey("8")),
|
||||
key("o", moreKey("9")),
|
||||
key("p", moreKey("0")))
|
||||
key("q", additionalMoreKey("1")),
|
||||
key("w", additionalMoreKey("2")),
|
||||
key("e", additionalMoreKey("3")),
|
||||
key("r", additionalMoreKey("4")),
|
||||
key("t", additionalMoreKey("5")),
|
||||
key("y", additionalMoreKey("6")),
|
||||
key("u", additionalMoreKey("7")),
|
||||
key("i", additionalMoreKey("8")),
|
||||
key("o", additionalMoreKey("9")),
|
||||
key("p", additionalMoreKey("0")))
|
||||
.setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10)
|
||||
.setKeysOfRow(3, "z", "x", "c", "v", "b", "n", "m")
|
||||
.build();
|
||||
|
|
|
@ -38,16 +38,16 @@ public final class Swiss extends LayoutBase {
|
|||
|
||||
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
|
||||
.setKeysOfRow(1,
|
||||
key("q", moreKey("1")),
|
||||
key("w", moreKey("2")),
|
||||
key("e", moreKey("3")),
|
||||
key("r", moreKey("4")),
|
||||
key("t", moreKey("5")),
|
||||
key("z", moreKey("6")),
|
||||
key("u", moreKey("7")),
|
||||
key("i", moreKey("8")),
|
||||
key("o", moreKey("9")),
|
||||
key("p", moreKey("0")),
|
||||
key("q", additionalMoreKey("1")),
|
||||
key("w", additionalMoreKey("2")),
|
||||
key("e", additionalMoreKey("3")),
|
||||
key("r", additionalMoreKey("4")),
|
||||
key("t", additionalMoreKey("5")),
|
||||
key("z", additionalMoreKey("6")),
|
||||
key("u", additionalMoreKey("7")),
|
||||
key("i", additionalMoreKey("8")),
|
||||
key("o", additionalMoreKey("9")),
|
||||
key("p", additionalMoreKey("0")),
|
||||
ROW1_11)
|
||||
.setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10, ROW2_11)
|
||||
.setKeysOfRow(3, "y", "x", "c", "v", "b", "n", "m")
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package com.android.inputmethod.keyboard.layout.expected;
|
||||
|
||||
import com.android.inputmethod.keyboard.internal.KeyboardIconsSet;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey.ExpectedAdditionalMoreKey;
|
||||
import com.android.inputmethod.latin.Constants;
|
||||
import com.android.inputmethod.latin.utils.StringUtils;
|
||||
|
||||
|
@ -61,6 +62,15 @@ public abstract class AbstractLayoutBase {
|
|||
return ExpectedKey.newInstance(key.getVisual(), key.getOutput(), moreKeys);
|
||||
}
|
||||
|
||||
// Helper method to create an {@link ExpectedAdditionalMoreKey} object for an
|
||||
// "additional more key" that has the label.
|
||||
// The additional more keys can be defined independently from other more keys. The position of
|
||||
// the additional more keys in the long press popup keyboard can be controlled by specifying
|
||||
// special marker "%" in the usual more keys definitions.
|
||||
public static ExpectedAdditionalMoreKey additionalMoreKey(final String label) {
|
||||
return ExpectedAdditionalMoreKey.newInstance(label);
|
||||
}
|
||||
|
||||
// Helper method to create an {@link ExpectedKey} object for a "more key" that has the label.
|
||||
public static ExpectedKey moreKey(final String label) {
|
||||
return ExpectedKey.newInstance(label);
|
||||
|
|
|
@ -18,7 +18,9 @@ package com.android.inputmethod.keyboard.layout.expected;
|
|||
|
||||
import com.android.inputmethod.keyboard.Key;
|
||||
import com.android.inputmethod.keyboard.internal.MoreKeySpec;
|
||||
import com.android.inputmethod.latin.utils.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -29,44 +31,73 @@ public class ExpectedKey {
|
|||
static ExpectedKey EMPTY_KEY = newInstance("");
|
||||
|
||||
// A key that has a string label and may have "more keys".
|
||||
static ExpectedKey newInstance(final String label, final ExpectedKey ... moreKeys) {
|
||||
static ExpectedKey newInstance(final String label, final ExpectedKey... moreKeys) {
|
||||
return newInstance(label, label, moreKeys);
|
||||
}
|
||||
|
||||
// A key that has a string label and a different output text and may have "more keys".
|
||||
static ExpectedKey newInstance(final String label, final String outputText,
|
||||
final ExpectedKey ... moreKeys) {
|
||||
final ExpectedKey... moreKeys) {
|
||||
return newInstance(ExpectedKeyVisual.newInstance(label),
|
||||
ExpectedKeyOutput.newInstance(outputText), moreKeys);
|
||||
}
|
||||
|
||||
// A key that has a string label and a code point output and may have "more keys".
|
||||
static ExpectedKey newInstance(final String label, final int code,
|
||||
final ExpectedKey ... moreKeys) {
|
||||
final ExpectedKey... moreKeys) {
|
||||
return newInstance(ExpectedKeyVisual.newInstance(label),
|
||||
ExpectedKeyOutput.newInstance(code), moreKeys);
|
||||
}
|
||||
|
||||
// A key that has an icon and an output text and may have "more keys".
|
||||
static ExpectedKey newInstance(final int iconId, final String outputText,
|
||||
final ExpectedKey ... moreKeys) {
|
||||
final ExpectedKey... moreKeys) {
|
||||
return newInstance(ExpectedKeyVisual.newInstance(iconId),
|
||||
ExpectedKeyOutput.newInstance(outputText), moreKeys);
|
||||
}
|
||||
|
||||
// A key that has an icon and a code point output and may have "more keys".
|
||||
static ExpectedKey newInstance(final int iconId, final int code,
|
||||
final ExpectedKey ... moreKeys) {
|
||||
final ExpectedKey... moreKeys) {
|
||||
return newInstance(ExpectedKeyVisual.newInstance(iconId),
|
||||
ExpectedKeyOutput.newInstance(code), moreKeys);
|
||||
}
|
||||
|
||||
static ExpectedKey newInstance(final ExpectedKeyVisual visual, final ExpectedKeyOutput output,
|
||||
final ExpectedKey ... moreKeys) {
|
||||
final ExpectedKey... moreKeys) {
|
||||
if (moreKeys.length == 0) {
|
||||
return new ExpectedKey(visual, output);
|
||||
}
|
||||
return new ExpectedKeyWithMoreKeys(visual, output, moreKeys);
|
||||
// The more keys are the extra keys that the main keyboard key may have in its long press
|
||||
// popup keyboard.
|
||||
// The additional more keys can be defined independently from other more keys.
|
||||
// The position of the additional more keys in the long press popup keyboard can be
|
||||
// controlled by specifying special marker "%" in the usual more keys definitions.
|
||||
final ArrayList<ExpectedKey> moreKeysList = CollectionUtils.newArrayList();
|
||||
final ArrayList<ExpectedAdditionalMoreKey> additionalMoreKeys =
|
||||
CollectionUtils.newArrayList();
|
||||
int firstAdditionalMoreKeyIndex = -1;
|
||||
for (int index = 0; index < moreKeys.length; index++) {
|
||||
final ExpectedKey moreKey = moreKeys[index];
|
||||
if (moreKey instanceof ExpectedAdditionalMoreKey) {
|
||||
additionalMoreKeys.add((ExpectedAdditionalMoreKey) moreKey);
|
||||
if (firstAdditionalMoreKeyIndex < 0) {
|
||||
firstAdditionalMoreKeyIndex = index;
|
||||
}
|
||||
} else {
|
||||
moreKeysList.add(moreKey);
|
||||
}
|
||||
}
|
||||
if (additionalMoreKeys.isEmpty()) {
|
||||
return new ExpectedKeyWithMoreKeys(visual, output, moreKeys);
|
||||
}
|
||||
final ExpectedKey[] moreKeysArray = moreKeysList.toArray(
|
||||
new ExpectedKey[moreKeysList.size()]);
|
||||
final ExpectedAdditionalMoreKey[] additionalMoreKeysArray = additionalMoreKeys.toArray(
|
||||
new ExpectedAdditionalMoreKey[additionalMoreKeys.size()]);
|
||||
return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys(
|
||||
visual, output, moreKeysArray, firstAdditionalMoreKeyIndex,
|
||||
additionalMoreKeysArray);
|
||||
}
|
||||
|
||||
private static final ExpectedKey[] EMPTY_KEYS = new ExpectedKey[0];
|
||||
|
@ -89,6 +120,27 @@ public class ExpectedKey {
|
|||
return EMPTY_KEYS;
|
||||
}
|
||||
|
||||
public ExpectedKey setMoreKeys(final ExpectedKey... moreKeys) {
|
||||
return newInstance(mVisual, mOutput, moreKeys);
|
||||
}
|
||||
|
||||
public ExpectedKey setAdditionalMoreKeys(
|
||||
final ExpectedAdditionalMoreKey... additionalMoreKeys) {
|
||||
if (additionalMoreKeys.length == 0) {
|
||||
return this;
|
||||
}
|
||||
return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys(
|
||||
mVisual, mOutput, EMPTY_KEYS, 0 /* additionalMoreKeysIndex */, additionalMoreKeys);
|
||||
}
|
||||
|
||||
public ExpectedKey setAdditionalMoreKeysIndex(final int additionalMoreKeysIndex) {
|
||||
if (additionalMoreKeysIndex == 0) {
|
||||
return this;
|
||||
}
|
||||
return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys(
|
||||
mVisual, mOutput, EMPTY_KEYS, additionalMoreKeysIndex);
|
||||
}
|
||||
|
||||
protected ExpectedKey(final ExpectedKeyVisual visual, final ExpectedKeyOutput output) {
|
||||
mVisual = visual;
|
||||
mOutput = output;
|
||||
|
@ -110,14 +162,14 @@ public class ExpectedKey {
|
|||
@Override
|
||||
public boolean equals(final Object object) {
|
||||
if (object instanceof ExpectedKey) {
|
||||
final ExpectedKey key = (ExpectedKey)object;
|
||||
final ExpectedKey key = (ExpectedKey) object;
|
||||
return mVisual.equalsTo(key.mVisual) && mOutput.equalsTo(key.mOutput)
|
||||
&& Arrays.equals(getMoreKeys(), key.getMoreKeys());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static int hashCode(final Object ... objects) {
|
||||
private static int hashCode(final Object... objects) {
|
||||
return Arrays.hashCode(objects);
|
||||
}
|
||||
|
||||
|
@ -134,14 +186,43 @@ public class ExpectedKey {
|
|||
return mVisual + "|" + mOutput;
|
||||
}
|
||||
|
||||
/**
|
||||
* This class represents an expected "additional more key".
|
||||
*
|
||||
* The additional more keys can be defined independently from other more keys. The position of
|
||||
* the additional more keys in the long press popup keyboard can be controlled by specifying
|
||||
* special marker "%" in the usual more keys definitions.
|
||||
*/
|
||||
public static class ExpectedAdditionalMoreKey extends ExpectedKey {
|
||||
public static ExpectedAdditionalMoreKey newInstance(final String label) {
|
||||
return new ExpectedAdditionalMoreKey(ExpectedKeyVisual.newInstance(label),
|
||||
ExpectedKeyOutput.newInstance(label));
|
||||
}
|
||||
|
||||
public static ExpectedAdditionalMoreKey newInstance(final ExpectedKey key) {
|
||||
return new ExpectedAdditionalMoreKey(key.getVisual(), key.getOutput());
|
||||
}
|
||||
|
||||
ExpectedAdditionalMoreKey(final ExpectedKeyVisual visual, final ExpectedKeyOutput output) {
|
||||
super(visual, output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedAdditionalMoreKey toUpperCase(final Locale locale) {
|
||||
final ExpectedKey upperCaseKey = super.toUpperCase(locale);
|
||||
return new ExpectedAdditionalMoreKey(
|
||||
upperCaseKey.getVisual(), upperCaseKey.getOutput());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class represents an expected key that has "more keys".
|
||||
*/
|
||||
private static final class ExpectedKeyWithMoreKeys extends ExpectedKey {
|
||||
private static class ExpectedKeyWithMoreKeys extends ExpectedKey {
|
||||
private final ExpectedKey[] mMoreKeys;
|
||||
|
||||
ExpectedKeyWithMoreKeys(final ExpectedKeyVisual visual,
|
||||
final ExpectedKeyOutput output, final ExpectedKey ... moreKeys) {
|
||||
ExpectedKeyWithMoreKeys(final ExpectedKeyVisual visual, final ExpectedKeyOutput output,
|
||||
final ExpectedKey... moreKeys) {
|
||||
super(visual, output);
|
||||
mMoreKeys = moreKeys;
|
||||
}
|
||||
|
@ -161,16 +242,37 @@ public class ExpectedKey {
|
|||
return mMoreKeys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKey setAdditionalMoreKeys(
|
||||
final ExpectedAdditionalMoreKey... additionalMoreKeys) {
|
||||
if (additionalMoreKeys.length == 0) {
|
||||
return this;
|
||||
}
|
||||
return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys(
|
||||
getVisual(), getOutput(), mMoreKeys, 0 /* additionalMoreKeysIndex */,
|
||||
additionalMoreKeys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKey setAdditionalMoreKeysIndex(final int additionalMoreKeysIndex) {
|
||||
if (additionalMoreKeysIndex == 0) {
|
||||
return this;
|
||||
}
|
||||
return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys(
|
||||
getVisual(), getOutput(), mMoreKeys, additionalMoreKeysIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsTo(final Key key) {
|
||||
if (getVisual().equalsTo(key) && getOutput().equalsTo(key)) {
|
||||
final MoreKeySpec[] moreKeys = key.getMoreKeys();
|
||||
final MoreKeySpec[] moreKeySpecs = key.getMoreKeys();
|
||||
final ExpectedKey[] moreKeys = getMoreKeys();
|
||||
// This key should have at least one "more key".
|
||||
if (moreKeys == null || moreKeys.length != mMoreKeys.length) {
|
||||
if (moreKeySpecs == null || moreKeySpecs.length != moreKeys.length) {
|
||||
return false;
|
||||
}
|
||||
for (int index = 0; index < moreKeys.length; index++) {
|
||||
if (!mMoreKeys[index].equalsTo(moreKeys[index])) {
|
||||
for (int index = 0; index < moreKeySpecs.length; index++) {
|
||||
if (!moreKeys[index].equalsTo(moreKeySpecs[index])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -187,7 +289,77 @@ public class ExpectedKey {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + "^" + Arrays.toString(mMoreKeys);
|
||||
return super.toString() + "^" + Arrays.toString(getMoreKeys());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class represents an expected key that has "more keys" and "additional more keys".
|
||||
*/
|
||||
private static final class ExpectedKeyWithMoreKeysAndAdditionalMoreKeys
|
||||
extends ExpectedKeyWithMoreKeys {
|
||||
private final ExpectedAdditionalMoreKey[] mAdditionalMoreKeys;
|
||||
private final int mAdditionalMoreKeysIndex;
|
||||
|
||||
ExpectedKeyWithMoreKeysAndAdditionalMoreKeys(final ExpectedKeyVisual visual,
|
||||
final ExpectedKeyOutput output, final ExpectedKey[] moreKeys,
|
||||
final int additionalMoreKeysIndex,
|
||||
final ExpectedAdditionalMoreKey... additionalMoreKeys) {
|
||||
super(visual, output, moreKeys);
|
||||
mAdditionalMoreKeysIndex = additionalMoreKeysIndex;
|
||||
mAdditionalMoreKeys = additionalMoreKeys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKey setMoreKeys(final ExpectedKey... moreKeys) {
|
||||
return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys(
|
||||
getVisual(), getOutput(), moreKeys, mAdditionalMoreKeysIndex,
|
||||
mAdditionalMoreKeys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKey setAdditionalMoreKeys(
|
||||
final ExpectedAdditionalMoreKey... additionalMoreKeys) {
|
||||
return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys(
|
||||
getVisual(), getOutput(), super.getMoreKeys(), mAdditionalMoreKeysIndex,
|
||||
additionalMoreKeys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKey setAdditionalMoreKeysIndex(final int additionalMoreKeysIndex) {
|
||||
return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys(
|
||||
getVisual(), getOutput(), super.getMoreKeys(), additionalMoreKeysIndex,
|
||||
mAdditionalMoreKeys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKey toUpperCase(final Locale locale) {
|
||||
final ExpectedKey[] moreKeys = super.getMoreKeys();
|
||||
final ExpectedKey[] upperCaseMoreKeys = new ExpectedKey[moreKeys.length];
|
||||
for (int i = 0; i < moreKeys.length; i++) {
|
||||
upperCaseMoreKeys[i] = moreKeys[i].toUpperCase(locale);
|
||||
}
|
||||
final ExpectedAdditionalMoreKey[] upperCaseAdditionalMoreKeys =
|
||||
new ExpectedAdditionalMoreKey[mAdditionalMoreKeys.length];
|
||||
for (int i = 0; i < mAdditionalMoreKeys.length; i++) {
|
||||
upperCaseAdditionalMoreKeys[i] = mAdditionalMoreKeys[i].toUpperCase(locale);
|
||||
}
|
||||
return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys(
|
||||
getVisual().toUpperCase(locale), getOutput().toUpperCase(locale),
|
||||
upperCaseMoreKeys, mAdditionalMoreKeysIndex, upperCaseAdditionalMoreKeys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getMoreKeys() {
|
||||
final ExpectedKey[] moreKeys = super.getMoreKeys();
|
||||
final ExpectedKey[] edittedMoreKeys = Arrays.copyOf(
|
||||
moreKeys, moreKeys.length + mAdditionalMoreKeys.length);
|
||||
System.arraycopy(edittedMoreKeys, mAdditionalMoreKeysIndex,
|
||||
edittedMoreKeys, mAdditionalMoreKeysIndex + mAdditionalMoreKeys.length,
|
||||
moreKeys.length - mAdditionalMoreKeysIndex);
|
||||
System.arraycopy(mAdditionalMoreKeys, 0, edittedMoreKeys, mAdditionalMoreKeysIndex,
|
||||
mAdditionalMoreKeys.length);
|
||||
return edittedMoreKeys;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,11 +163,38 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec
|
|||
}
|
||||
|
||||
private void setMoreKeysOf(final ExpectedKeyVisual visual, final ExpectedKey[] moreKeys) {
|
||||
replaceKeyOf(visual, new ReplaceJob() {
|
||||
@Override
|
||||
public ExpectedKey[] replacingKeys(final ExpectedKey oldKey) {
|
||||
return new ExpectedKey[] { oldKey.setMoreKeys(moreKeys) };
|
||||
}
|
||||
@Override
|
||||
public boolean stopAtFirstOccurrence() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the "additional more keys position" of the key that has the specified label.
|
||||
* @param label the label of the key to set the "additional more keys".
|
||||
* @param additionalMoreKeysPosition the position in the "more keys" where
|
||||
* "additional more keys" will be merged. The position starts from 1.
|
||||
* @return this builder.
|
||||
*/
|
||||
public ExpectedKeyboardBuilder setAdditionalMoreKeysPositionOf(final String label,
|
||||
final int additionalMoreKeysPosition) {
|
||||
final int additionalMoreKeysIndex = additionalMoreKeysPosition - 1;
|
||||
if (additionalMoreKeysIndex < 0) {
|
||||
throw new RuntimeException("Illegal additional more keys position: "
|
||||
+ additionalMoreKeysPosition);
|
||||
}
|
||||
final ExpectedKeyVisual visual = ExpectedKeyVisual.newInstance(label);
|
||||
replaceKeyOf(visual, new ReplaceJob() {
|
||||
@Override
|
||||
public ExpectedKey[] replacingKeys(final ExpectedKey oldKey) {
|
||||
return new ExpectedKey[] {
|
||||
ExpectedKey.newInstance(oldKey.getVisual(), oldKey.getOutput(), moreKeys)
|
||||
oldKey.setAdditionalMoreKeysIndex(additionalMoreKeysIndex)
|
||||
};
|
||||
}
|
||||
@Override
|
||||
|
@ -175,6 +202,7 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec
|
|||
return true;
|
||||
}
|
||||
});
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright (C) 2014 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard.layout.tests;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
class EnglishCustomizer extends LayoutCustomizer {
|
||||
EnglishCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113")
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "\u00FB", "\u00FC", "\u00F9", "\u00FA", "\u016B")
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
.setMoreKeysOf("i", "\u00EE", "\u00EF", "\u00ED", "\u012B", "\u00EC")
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
.setMoreKeysOf("o",
|
||||
"\u00F4", "\u00F6", "\u00F2", "\u00F3", "\u0153", "\u00F8", "\u014D",
|
||||
"\u00F5")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E0", "\u00E1", "\u00E2", "\u00E4", "\u00E6", "\u00E3", "\u00E5",
|
||||
"\u0101")
|
||||
// U+00DF: "ß" LATIN SMALL LETTER SHARP S
|
||||
.setMoreKeysOf("s", "\u00DF")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
.setMoreKeysOf("c", "\u00E7")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
.setMoreKeysOf("n", "\u00F1");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Copyright (C) 2014 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard.layout.tests;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
class FrenchCustomizer extends LayoutCustomizer {
|
||||
FrenchCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
// U+00AA: "ª" FEMININE ORDINAL INDICATOR
|
||||
.setAdditionalMoreKeysPositionOf("a", 3)
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E0", "\u00E2", "\u00E6", "\u00E1", "\u00E4", "\u00E3", "\u00E5",
|
||||
"\u0101", "\u00AA")
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setAdditionalMoreKeysPositionOf("e", 5)
|
||||
.setMoreKeysOf("e",
|
||||
"\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113")
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "\u00FF")
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setAdditionalMoreKeysPositionOf("u", 3)
|
||||
.setMoreKeysOf("u", "\u00F9", "\u00FB", "\u00FC", "\u00FA", "\u016B")
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setAdditionalMoreKeysPositionOf("i", 2)
|
||||
.setMoreKeysOf("i", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F", "\u012B")
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setAdditionalMoreKeysPositionOf("o", 3)
|
||||
.setMoreKeysOf("o",
|
||||
"\u00F4", "\u0153", "\u00F6", "\u00F2", "\u00F3", "\u00F5", "\u00F8",
|
||||
"\u014D", "\u00BA")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
// U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
|
||||
// U+010D: "č" LATIN SMALL LETTER C WITH CARON
|
||||
.setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* Copyright (C) 2014 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard.layout.tests;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.Symbols;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
class GermanCustomizer extends LayoutCustomizer {
|
||||
public GermanCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_R9L; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
.setMoreKeysOf("e", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0117")
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"\u00F6", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153", "\u00F8",
|
||||
"\u014D")
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E4", "\u00E2", "\u00E0", "\u00E1", "\u00E6", "\u00E3", "\u00E5",
|
||||
"\u0101")
|
||||
// U+00DF: "ß" LATIN SMALL LETTER SHARP S
|
||||
// U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
|
||||
// U+0161: "š" LATIN SMALL LETTER S WITH CARON
|
||||
.setMoreKeysOf("s", "\u00DF", "\u015B", "\u0161")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
// U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
|
||||
.setMoreKeysOf("n", "\u00F1", "\u0144");
|
||||
}
|
||||
}
|
|
@ -28,6 +28,7 @@ import com.android.inputmethod.keyboard.layout.LayoutBase;
|
|||
import com.android.inputmethod.keyboard.layout.expected.AbstractLayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ActualKeyboardBuilder;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey.ExpectedAdditionalMoreKey;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
|
||||
|
||||
|
@ -72,6 +73,12 @@ abstract class LayoutTestsBase extends KeyboardLayoutSetTestsBase {
|
|||
return AbstractLayoutBase.key(key, moreKeys);
|
||||
}
|
||||
|
||||
// Helper method to create an {@link ExpectedAdditionalMoreKey} object for an
|
||||
// "additional more key" that has the label.
|
||||
public static ExpectedAdditionalMoreKey additionalMoreKey(final String label) {
|
||||
return AbstractLayoutBase.additionalMoreKey(label);
|
||||
}
|
||||
|
||||
// Helper method to create an {@link ExpectedKey} object for a "more key" that has the label.
|
||||
static ExpectedKey moreKey(final String label) {
|
||||
return AbstractLayoutBase.moreKey(label);
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Copyright (C) 2014 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard.layout.tests;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
class PortugueseCustomizer extends LayoutCustomizer {
|
||||
PortugueseCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
.setMoreKeysOf("e",
|
||||
"\u00E9", "\u00EA", "\u00E8", "\u0119", "\u0117", "\u0113", "\u00EB")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "\u00ED", "\u00EE", "\u00EC", "\u00EF", "\u012F", "\u012B")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"\u00F3", "\u00F5", "\u00F4", "\u00F2", "\u00F6", "\u0153", "\u00F8",
|
||||
"\u014D", "\u00BA")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00AA: "ª" FEMININE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E1", "\u00E3", "\u00E0", "\u00E2", "\u00E4", "\u00E5", "\u00E6",
|
||||
"\u00AA")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
// U+010D: "č" LATIN SMALL LETTER C WITH CARON
|
||||
// U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
|
||||
.setMoreKeysOf("c", "\u00E7", "\u010D", "\u0107");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* Copyright (C) 2014 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard.layout.tests;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Spanish;
|
||||
import com.android.inputmethod.keyboard.layout.expected.AbstractLayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
class SpanishCustomizer extends LayoutCustomizer {
|
||||
SpanishCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) {
|
||||
return isPhone ? PHONE_PUNCTUATION_MORE_KEYS
|
||||
: LayoutBase.TABLET_PUNCTUATION_MORE_KEYS;
|
||||
}
|
||||
|
||||
// Punctuation more keys for phone form factor.
|
||||
private static final ExpectedKey[] PHONE_PUNCTUATION_MORE_KEYS = AbstractLayoutBase.joinKeys(
|
||||
// U+00A1: "¡" INVERTED EXCLAMATION MARK
|
||||
// U+00BF: "¿" INVERTED QUESTION MARK
|
||||
"\u00A1", ";", "/", "(", ")", "#", "!", ",", "?",
|
||||
"\u00BF", "&", "%", "+", "\"", "-", ":", "'", "@");
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"\u00E9", "\u00E8", "\u00EB", "\u00EA", "\u0119", "\u0117", "\u0113")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"\u00F3", "\u00F2", "\u00F6", "\u00F4", "\u00F5", "\u00F8", "\u0153",
|
||||
"\u014D", "\u00BA")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
// U+00AA: "ª" FEMININE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E1", "\u00E0", "\u00E4", "\u00E2", "\u00E3", "\u00E5", "\u0105",
|
||||
"\u00E6", "\u0101", "\u00AA")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
.replaceKeyOfLabel(Spanish.ROW2_10, "\u00F1")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
// U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
|
||||
// U+010D: "č" LATIN SMALL LETTER C WITH CARON
|
||||
.setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
// U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
|
||||
.setMoreKeysOf("n", "\u00F1", "\u0144");
|
||||
}
|
||||
}
|
|
@ -50,17 +50,16 @@ public final class TestsAfrikaans extends LayoutTestsBase {
|
|||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
"\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FA", "\u00FB", "\u00FC", "\u00F9", "\u016B")
|
||||
.setMoreKeysOf("u", "\u00FA", "\u00FB", "\u00FC", "\u00F9", "\u016B")
|
||||
// U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
|
||||
// U+0133: "ij" LATIN SMALL LIGATURE IJ
|
||||
.setMoreKeysOf("y", "6", "\u00FD", "\u0133")
|
||||
.setMoreKeysOf("y", "\u00FD", "\u0133")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
|
@ -69,8 +68,7 @@ public final class TestsAfrikaans extends LayoutTestsBase {
|
|||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
// U+0133: "ij" LATIN SMALL LIGATURE IJ
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u00ED", "\u00EC", "\u00EF", "\u00EE", "\u012F", "\u012B",
|
||||
"\u0133")
|
||||
"\u00ED", "\u00EC", "\u00EF", "\u00EE", "\u012F", "\u012B", "\u0133")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
|
@ -80,8 +78,8 @@ public final class TestsAfrikaans extends LayoutTestsBase {
|
|||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F3", "\u00F4", "\u00F6", "\u00F2", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D")
|
||||
"\u00F3", "\u00F4", "\u00F6", "\u00F2", "\u00F5", "\u0153", "\u00F8",
|
||||
"\u014D")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
|
|
|
@ -43,13 +43,13 @@ public final class TestsAzerbaijaniAZ extends LayoutTestsBase {
|
|||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+0259: "ə" LATIN SMALL LETTER SCHWA
|
||||
.setMoreKeysOf("e", "3", "\u0259")
|
||||
.setMoreKeysOf("e", "\u0259")
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
|
||||
.setMoreKeysOf("u", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
|
||||
// U+0131: "ı" LATIN SMALL LETTER DOTLESS I
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
|
@ -58,8 +58,7 @@ public final class TestsAzerbaijaniAZ extends LayoutTestsBase {
|
|||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u0131", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F",
|
||||
"\u012B")
|
||||
"\u0131", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F", "\u012B")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
|
@ -69,8 +68,8 @@ public final class TestsAzerbaijaniAZ extends LayoutTestsBase {
|
|||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F6", "\u00F4", "\u0153", "\u00F2", "\u00F3", "\u00F5",
|
||||
"\u00F8", "\u014D")
|
||||
"\u00F6", "\u00F4", "\u0153", "\u00F2", "\u00F3", "\u00F5", "\u00F8",
|
||||
"\u014D")
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
.setMoreKeysOf("a", "\u00E2")
|
||||
// U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA
|
||||
|
|
|
@ -56,15 +56,15 @@ public final class TestsBelarusianBY extends LayoutTestsBase {
|
|||
return builder
|
||||
// U+0435: "е" CYRILLIC SMALL LETTER IE
|
||||
// U+0451: "ё" CYRILLIC SMALL LETTER IO
|
||||
.setMoreKeysOf("\u0435", "5", "\u0451")
|
||||
.setMoreKeysOf("\u0435", "\u0451")
|
||||
// U+045E: "ў" CYRILLIC SMALL LETTER SHORT U
|
||||
.replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u045E", moreKey("9")))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u045E", additionalMoreKey("9")))
|
||||
// U+044B: "ы" CYRILLIC SMALL LETTER YERU
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_2, key("\u044B"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_2, "\u044B")
|
||||
// U+044D: "э" CYRILLIC SMALL LETTER E
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_11, key("\u044D"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_11, "\u044D")
|
||||
// U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
.replaceKeyOfLabel(EastSlavic.ROW3_5, key("\u0456"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW3_5, "\u0456")
|
||||
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
|
||||
.setMoreKeysOf("\u044C", "\u044A");
|
||||
|
|
|
@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Spanish;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
@ -37,7 +37,7 @@ public class TestsCatalan extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class CatalanCustomizer extends EuroLayoutCustomizer {
|
||||
private static class CatalanCustomizer extends EuroCustomizer {
|
||||
public CatalanCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
|
@ -66,22 +66,20 @@ public class TestsCatalan extends LayoutTestsBase {
|
|||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E8", "\u00E9", "\u00EB", "\u00EA", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
"\u00E8", "\u00E9", "\u00EB", "\u00EA", "\u0119", "\u0117", "\u0113")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B")
|
||||
.setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B")
|
||||
.setMoreKeysOf("i", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B")
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
|
@ -92,8 +90,8 @@ public class TestsCatalan extends LayoutTestsBase {
|
|||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F2", "\u00F3", "\u00F6", "\u00F4", "\u00F5", "\u00F8",
|
||||
"\u0153", "\u014D", "\u00BA")
|
||||
"\u00F2", "\u00F3", "\u00F6", "\u00F4", "\u00F5", "\u00F8", "\u0153",
|
||||
"\u014D", "\u00BA")
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
|
@ -111,7 +109,7 @@ public class TestsCatalan extends LayoutTestsBase {
|
|||
// U+0142: "ł" LATIN SMALL LETTER L WITH STROKE
|
||||
.setMoreKeysOf("l", "l\u00B7l", "\u0142")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
.replaceKeyOfLabel(Spanish.ROW2_10, key("\u00E7"))
|
||||
.replaceKeyOfLabel(Spanish.ROW2_10, "\u00E7")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
// U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
|
||||
// U+010D: "č" LATIN SMALL LETTER C WITH CARON
|
||||
|
|
|
@ -59,7 +59,7 @@ public final class TestsCroatian extends LayoutTestsBase {
|
|||
// U+017E: "ž" LATIN SMALL LETTER Z WITH CARON
|
||||
// U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE
|
||||
// U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE
|
||||
.setMoreKeysOf("z", "6", "\u017E", "\u017A", "\u017C")
|
||||
.setMoreKeysOf("z", "\u017E", "\u017A", "\u017C")
|
||||
// U+0161: "š" LATIN SMALL LETTER S WITH CARON
|
||||
// U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
|
||||
// U+00DF: "ß" LATIN SMALL LETTER SHARP S
|
||||
|
|
|
@ -65,32 +65,30 @@ public final class TestsCzech extends LayoutTestsBase {
|
|||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E9", "\u011B", "\u00E8", "\u00EA", "\u00EB", "\u0119",
|
||||
"\u0117", "\u0113")
|
||||
"\u00E9", "\u011B", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
// U+0159: "ř" LATIN SMALL LETTER R WITH CARON
|
||||
.setMoreKeysOf("r", "4", "\u0159")
|
||||
.setMoreKeysOf("r", "\u0159")
|
||||
// U+0165: "ť" LATIN SMALL LETTER T WITH CARON
|
||||
.setMoreKeysOf("t", "5", "\u0165")
|
||||
.setMoreKeysOf("t", "\u0165")
|
||||
// U+017E: "ž" LATIN SMALL LETTER Z WITH CARON
|
||||
// U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE
|
||||
// U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE
|
||||
.setMoreKeysOf("z", "6", "\u017E", "\u017A", "\u017C")
|
||||
.setMoreKeysOf("z", "\u017E", "\u017A", "\u017C")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u",
|
||||
"7", "\u00FA", "\u016F", "\u00FB", "\u00FC", "\u00F9", "\u016B")
|
||||
.setMoreKeysOf("u", "\u00FA", "\u016F", "\u00FB", "\u00FC", "\u00F9", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u00ED", "\u00EE", "\u00EF", "\u00EC", "\u012F", "\u012B")
|
||||
.setMoreKeysOf("i", "\u00ED", "\u00EE", "\u00EF", "\u00EC", "\u012F", "\u012B")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
|
@ -100,8 +98,8 @@ public final class TestsCzech extends LayoutTestsBase {
|
|||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D")
|
||||
"\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8",
|
||||
"\u014D")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
|
|
|
@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Nordic;
|
||||
import com.android.inputmethod.keyboard.layout.Symbols;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
|
@ -38,7 +38,7 @@ public final class TestsDanish extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class DanishCustomizer extends EuroLayoutCustomizer {
|
||||
private static class DanishCustomizer extends EuroCustomizer {
|
||||
public DanishCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
|
@ -58,29 +58,28 @@ public final class TestsDanish extends LayoutTestsBase {
|
|||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
.setMoreKeysOf("e", "3", "\u00E9", "\u00EB")
|
||||
.setMoreKeysOf("e", "\u00E9", "\u00EB")
|
||||
// U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "6", "\u00FD", "\u00FF")
|
||||
.setMoreKeysOf("y", "\u00FD", "\u00FF")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B")
|
||||
.setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
.setMoreKeysOf("i", "8", "\u00ED", "\u00EF")
|
||||
.setMoreKeysOf("i", "\u00ED", "\u00EF")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F3", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u014D")
|
||||
.setMoreKeysOf("o", "\u00F3", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u014D")
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
.replaceKeyOfLabel(Nordic.ROW1_11, key("\u00E5"))
|
||||
.replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
.replaceKeyOfLabel(Nordic.ROW2_10, key("\u00E6", moreKey("\u00E4")))
|
||||
|
|
|
@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwerty;
|
||||
import com.android.inputmethod.keyboard.layout.Symbols;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
|
@ -38,7 +38,7 @@ public final class TestsDutch extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class DutchCustomizer extends EuroLayoutCustomizer {
|
||||
static class DutchCustomizer extends EuroCustomizer {
|
||||
public DutchCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
|
@ -50,45 +50,6 @@ public final class TestsDutch extends LayoutTestsBase {
|
|||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E9", "\u00EB", "\u00EA", "\u00E8", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
// U+0133: "ij" LATIN SMALL LIGATURE IJ
|
||||
.setMoreKeysOf("y", "6", "\u0133")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
// U+0133: "ij" LATIN SMALL LIGATURE IJ
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B",
|
||||
"\u0133")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
|
@ -100,6 +61,43 @@ public final class TestsDutch extends LayoutTestsBase {
|
|||
.setMoreKeysOf("a",
|
||||
"\u00E1", "\u00E4", "\u00E2", "\u00E0", "\u00E6", "\u00E3", "\u00E5",
|
||||
"\u0101")
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"\u00E9", "\u00EB", "\u00EA", "\u00E8", "\u0119", "\u0117", "\u0113")
|
||||
// U+0133: "ij" LATIN SMALL LIGATURE IJ
|
||||
.setMoreKeysOf("y", "\u0133")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
// U+0133: "ij" LATIN SMALL LIGATURE IJ
|
||||
.setMoreKeysOf("i",
|
||||
"\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B", "\u0133")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8",
|
||||
"\u014D")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
// U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
|
||||
.setMoreKeysOf("n", "\u00F1", "\u0144");
|
||||
|
|
|
@ -20,10 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
|
|||
|
||||
import com.android.inputmethod.keyboard.layout.Azerty;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Symbols;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
import com.android.inputmethod.keyboard.layout.tests.TestsDutch.DutchCustomizer;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -33,76 +30,8 @@ import java.util.Locale;
|
|||
@SmallTest
|
||||
public final class TestsDutchBE extends LayoutTestsBase {
|
||||
private static final Locale LOCALE = new Locale("nl", "BE");
|
||||
private static final LayoutBase LAYOUT = new Azerty(new DutchBECustomizer(LOCALE));
|
||||
private static final LayoutBase LAYOUT = new Azerty(new DutchCustomizer(LOCALE));
|
||||
|
||||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class DutchBECustomizer extends EuroLayoutCustomizer {
|
||||
public DutchBECustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_L9R; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_L9R; }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
.setMoreKeysOf("a",
|
||||
"1", "\u00E1", "\u00E4", "\u00E2", "\u00E0", "\u00E6", "\u00E3",
|
||||
"\u00E5", "\u0101")
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E9", "\u00EB", "\u00EA", "\u00E8", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
// U+0133: "ij" LATIN SMALL LIGATURE IJ
|
||||
.setMoreKeysOf("y", "6", "\u0133")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
// U+0133: "ij" LATIN SMALL LIGATURE IJ
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B",
|
||||
"\u0133")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
// U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
|
||||
.setMoreKeysOf("n", "\u00F1", "\u0144");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public final class TestsEnglishUK extends TestsEnglishUS {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class EnglishUKCustomizer extends EnglishUSCustomizer {
|
||||
private static class EnglishUKCustomizer extends EnglishCustomizer {
|
||||
public EnglishUKCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,9 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwerty;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -31,63 +29,8 @@ import java.util.Locale;
|
|||
@SmallTest
|
||||
public class TestsEnglishUS extends LayoutTestsBase {
|
||||
private static final Locale LOCALE = new Locale("en", "US");
|
||||
private static final LayoutBase LAYOUT = new Qwerty(new EnglishUSCustomizer(LOCALE));
|
||||
private static final LayoutBase LAYOUT = new Qwerty(new EnglishCustomizer(LOCALE));
|
||||
|
||||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
// TODO: Make this as generic English customizer.
|
||||
static class EnglishUSCustomizer extends LayoutCustomizer {
|
||||
public EnglishUSCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e", "3", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113")
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FB", "\u00FC", "\u00F9", "\u00FA", "\u016B")
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
.setMoreKeysOf("i", "8", "\u00EE", "\u00EF", "\u00ED", "\u012B", "\u00EC")
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F4", "\u00F6", "\u00F2", "\u00F3", "\u0153", "\u00F8",
|
||||
"\u014D", "\u00F5")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E0", "\u00E1", "\u00E2", "\u00E4", "\u00E6", "\u00E3", "\u00E5",
|
||||
"\u0101")
|
||||
// U+00DF: "ß" LATIN SMALL LETTER SHARP S
|
||||
.setMoreKeysOf("s", "\u00DF")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
.setMoreKeysOf("c", "\u00E7")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
.setMoreKeysOf("n", "\u00F1");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,11 +43,12 @@ public class TestsEsperanto extends LayoutTestsBase {
|
|||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX
|
||||
.replaceKeyOfLabel("q", key("\u015D", moreKey("1"), moreKey("q")))
|
||||
.replaceKeyOfLabel("q", key("\u015D", joinMoreKeys(
|
||||
additionalMoreKey("1"), "q")))
|
||||
// U+011D: "ĝ" LATIN SMALL LETTER G WITH CIRCUMFLEX
|
||||
// U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX
|
||||
.replaceKeyOfLabel("w", key("\u011D",
|
||||
moreKey("2"), moreKey("w"), moreKey("\u0175")))
|
||||
.replaceKeyOfLabel("w", key("\u011D", joinMoreKeys(
|
||||
additionalMoreKey("2"), "w", "\u0175")))
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+011B: "ě" LATIN SMALL LETTER E WITH CARON
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
|
@ -57,25 +58,24 @@ public class TestsEsperanto extends LayoutTestsBase {
|
|||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E9", "\u011B", "\u00E8", "\u00EA", "\u00EB", "\u0119",
|
||||
"\u0117", "\u0113")
|
||||
"\u00E9", "\u011B", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
// U+0159: "ř" LATIN SMALL LETTER R WITH CARON
|
||||
// U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE
|
||||
// U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA
|
||||
.setMoreKeysOf("r", "4", "\u0159", "\u0155", "\u0157")
|
||||
.setMoreKeysOf("r", "\u0159", "\u0155", "\u0157")
|
||||
// U+0165: "ť" LATIN SMALL LETTER T WITH CARON
|
||||
// U+021B: "ț" LATIN SMALL LETTER T WITH COMMA BELOW
|
||||
// U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA
|
||||
// U+0167: "ŧ" LATIN SMALL LETTER T WITH STROKE
|
||||
.setMoreKeysOf("t", "5", "\u0165", "\u021B", "\u0163", "\u0167")
|
||||
.setMoreKeysOf("t", "\u0165", "\u021B", "\u0163", "\u0167")
|
||||
// U+016D: "ŭ" LATIN SMALL LETTER U WITH BREVE
|
||||
// U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
|
||||
// U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
// U+00FE: "þ" LATIN SMALL LETTER THORN
|
||||
.replaceKeyOfLabel("y", key("\u016D",
|
||||
moreKey("6"), moreKey("y"), moreKey("\u00FD"), moreKey("\u0177"),
|
||||
moreKey("\u00FF"), moreKey("\u00FE")))
|
||||
.replaceKeyOfLabel("y", key("\u016D", joinMoreKeys(
|
||||
additionalMoreKey("6"), "y", "\u00FD", "\u0177", "\u00FF", "\u00FE")))
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
|
@ -87,8 +87,8 @@ public class TestsEsperanto extends LayoutTestsBase {
|
|||
// U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK
|
||||
// U+00B5: "µ" MICRO SIGN
|
||||
.setMoreKeysOf("u",
|
||||
"7", "\u00FA", "\u016F", "\u00FB", "\u00FC", "\u00F9", "\u016B",
|
||||
"\u0169", "\u0171", "\u0173", "\u00B5")
|
||||
"\u00FA", "\u016F", "\u00FB", "\u00FC", "\u00F9", "\u016B", "\u0169",
|
||||
"\u0171", "\u0173", "\u00B5")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
|
@ -99,8 +99,8 @@ public class TestsEsperanto extends LayoutTestsBase {
|
|||
// U+0131: "ı" LATIN SMALL LETTER DOTLESS I
|
||||
// U+0133: "ij" LATIN SMALL LIGATURE IJ
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u00ED", "\u00EE", "\u00EF", "\u0129", "\u00EC", "\u012F",
|
||||
"\u012B", "\u0131", "\u0133")
|
||||
"\u00ED", "\u00EE", "\u00EF", "\u0129", "\u00EC", "\u012F", "\u012B",
|
||||
"\u0131", "\u0133")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
|
@ -112,8 +112,8 @@ public class TestsEsperanto extends LayoutTestsBase {
|
|||
// U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D", "\u0151", "\u00BA")
|
||||
"\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8",
|
||||
"\u014D", "\u0151", "\u00BA")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
|
@ -162,7 +162,7 @@ public class TestsEsperanto extends LayoutTestsBase {
|
|||
// U+0142: "ł" LATIN SMALL LETTER L WITH STROKE
|
||||
.setMoreKeysOf("l", "\u013A", "\u013C", "\u013E", "\u0140", "\u0142")
|
||||
// U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX
|
||||
.replaceKeyOfLabel(Spanish.ROW2_10, key("\u0135"))
|
||||
.replaceKeyOfLabel(Spanish.ROW2_10, "\u0135")
|
||||
// U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE
|
||||
// U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE
|
||||
// U+017E: "ž" LATIN SMALL LETTER Z WITH CARON
|
||||
|
|
|
@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Nordic;
|
||||
import com.android.inputmethod.keyboard.layout.Symbols;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
|
@ -38,7 +38,7 @@ public final class TestsEstonianEE extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class EstonianEECustomizer extends EuroLayoutCustomizer {
|
||||
private static class EstonianEECustomizer extends EuroCustomizer {
|
||||
public EstonianEECustomizer(final Locale locale) {
|
||||
super(locale);
|
||||
}
|
||||
|
@ -61,18 +61,18 @@ public final class TestsEstonianEE extends LayoutTestsBase {
|
|||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+011B: "ě" LATIN SMALL LETTER E WITH CARON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u0113", "\u00E8", "\u0117", "\u00E9", "\u00EA", "\u00EB",
|
||||
"\u0119", "\u011B")
|
||||
"\u0113", "\u00E8", "\u0117", "\u00E9", "\u00EA", "\u00EB", "\u0119",
|
||||
"\u011B")
|
||||
// U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA
|
||||
// U+0159: "ř" LATIN SMALL LETTER R WITH CARON
|
||||
// U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE
|
||||
.setMoreKeysOf("r", "4", "\u0157", "\u0159", "\u0155")
|
||||
.setMoreKeysOf("r", "\u0157", "\u0159", "\u0155")
|
||||
// U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA
|
||||
// U+0165: "ť" LATIN SMALL LETTER T WITH CARON
|
||||
.setMoreKeysOf("t", "5", "\u0163", "\u0165")
|
||||
.setMoreKeysOf("t", "\u0163", "\u0165")
|
||||
// U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "6", "\u00FD", "\u00FF")
|
||||
.setMoreKeysOf("y", "\u00FD", "\u00FF")
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
// U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK
|
||||
|
@ -82,8 +82,8 @@ public final class TestsEstonianEE extends LayoutTestsBase {
|
|||
// U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE
|
||||
// U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE
|
||||
.setMoreKeysOf("u",
|
||||
"7", "\u00FC", "\u016B", "\u0173", "\u00F9", "\u00FA", "\u00FB",
|
||||
"\u016F", "\u0171")
|
||||
"\u00FC", "\u016B", "\u0173", "\u00F9", "\u00FA", "\u00FB", "\u016F",
|
||||
"\u0171")
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
|
@ -92,8 +92,7 @@ public final class TestsEstonianEE extends LayoutTestsBase {
|
|||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+0131: "ı" LATIN SMALL LETTER DOTLESS I
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u012B", "\u00EC", "\u012F", "\u00ED", "\u00EE", "\u00EF",
|
||||
"\u0131")
|
||||
"\u012B", "\u00EC", "\u012F", "\u00ED", "\u00EE", "\u00EF", "\u0131")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
|
@ -103,15 +102,15 @@ public final class TestsEstonianEE extends LayoutTestsBase {
|
|||
// U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F6", "\u00F5", "\u00F2", "\u00F3", "\u00F4", "\u0153",
|
||||
"\u0151", "\u00F8")
|
||||
"\u00F6", "\u00F5", "\u00F2", "\u00F3", "\u00F4", "\u0153", "\u0151",
|
||||
"\u00F8")
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
.replaceKeyOfLabel(Nordic.ROW1_11, key("\u00FC"))
|
||||
.replaceKeyOfLabel(Nordic.ROW1_11, "\u00FC")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
.replaceKeyOfLabel(Nordic.ROW2_10, key("\u00F6", moreKey("\u00F5")))
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
.replaceKeyOfLabel(Nordic.ROW2_11, key("\u00E4"))
|
||||
.replaceKeyOfLabel(Nordic.ROW2_11, "\u00E4")
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
|
|
|
@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Nordic;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
|
@ -36,14 +36,14 @@ public final class TestsFinnish extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class FinnishCustomizer extends EuroLayoutCustomizer {
|
||||
private static class FinnishCustomizer extends EuroCustomizer {
|
||||
public FinnishCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
.setMoreKeysOf("u", "7", "\u00FC")
|
||||
.setMoreKeysOf("u", "\u00FC")
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
|
@ -52,10 +52,9 @@ public final class TestsFinnish extends LayoutTestsBase {
|
|||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F8", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153",
|
||||
"\u014D")
|
||||
"\u00F8", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153", "\u014D")
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
.replaceKeyOfLabel(Nordic.ROW1_11, key("\u00E5"))
|
||||
.replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
.replaceKeyOfLabel(Nordic.ROW2_10, key("\u00F6", moreKey("\u00F8")))
|
||||
|
|
|
@ -20,8 +20,8 @@ import android.test.suitebuilder.annotation.SmallTest;
|
|||
|
||||
import com.android.inputmethod.keyboard.layout.Azerty;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -31,71 +31,25 @@ import java.util.Locale;
|
|||
@SmallTest
|
||||
public final class TestsFrench extends LayoutTestsBase {
|
||||
private static final Locale LOCALE = new Locale("fr");
|
||||
private static final LayoutBase LAYOUT = new Azerty(new FrenchCustomizer(LOCALE));
|
||||
private static final LayoutBase LAYOUT = new Azerty(new FrenchEuroCustomizer(LOCALE));
|
||||
|
||||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class FrenchCustomizer extends EuroLayoutCustomizer {
|
||||
public FrenchCustomizer(final Locale locale) { super(locale); }
|
||||
static final class FrenchEuroCustomizer extends FrenchCustomizer {
|
||||
private final EuroCustomizer mEuroCustomizer;
|
||||
|
||||
public FrenchEuroCustomizer(final Locale locale) {
|
||||
super(locale);
|
||||
mEuroCustomizer = new EuroCustomizer(locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
// U+00AA: "ª" FEMININE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E0", "\u00E2", "1", "\u00E6", "\u00E1", "\u00E4", "\u00E3",
|
||||
"\u00E5", "\u0101", "\u00AA")
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"\u00E9", "\u00E8", "\u00EA", "\u00EB", "3", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "6", "\u00FF")
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "\u00F9", "\u00FB", "7", "\u00FC", "\u00FA", "\u016B")
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "\u00EE", "8", "\u00EF", "\u00EC", "\u00ED", "\u012F",
|
||||
"\u012B")
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"\u00F4", "\u0153", "9", "\u00F6", "\u00F2", "\u00F3", "\u00F5",
|
||||
"\u00F8", "\u014D", "\u00BA")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
// U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
|
||||
// U+010D: "č" LATIN SMALL LETTER C WITH CARON
|
||||
.setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D");
|
||||
public final ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); }
|
||||
|
||||
@Override
|
||||
public final ExpectedKey[] getOtherCurrencyKeys() {
|
||||
return mEuroCustomizer.getOtherCurrencyKeys();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -19,9 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwerty;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -31,71 +29,8 @@ import java.util.Locale;
|
|||
@SmallTest
|
||||
public final class TestsFrenchCA extends LayoutTestsBase {
|
||||
private static final Locale LOCALE = new Locale("fr", "CA");
|
||||
private static final LayoutBase LAYOUT = new Qwerty(new FrenchCACustomizer(LOCALE));
|
||||
private static final LayoutBase LAYOUT = new Qwerty(new FrenchCustomizer(LOCALE));
|
||||
|
||||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class FrenchCACustomizer extends LayoutCustomizer {
|
||||
public FrenchCACustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"\u00E9", "\u00E8", "\u00EA", "\u00EB", "3", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "6", "\u00FF")
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "\u00F9", "\u00FB", "7", "\u00FC", "\u00FA", "\u016B")
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "\u00EE", "8", "\u00EF", "\u00EC", "\u00ED", "\u012F",
|
||||
"\u012B")
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"\u00F4", "\u0153", "9", "\u00F6", "\u00F2", "\u00F3", "\u00F5",
|
||||
"\u00F8", "\u014D", "\u00BA")
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
// U+00AA: "ª" FEMININE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E0", "\u00E2", "\u00E6", "\u00E1", "\u00E4", "\u00E3", "\u00E5",
|
||||
"\u0101", "\u00AA")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
// U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
|
||||
// U+010D: "č" LATIN SMALL LETTER C WITH CARON
|
||||
.setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Swiss;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
|
@ -36,75 +35,22 @@ public final class TestsFrenchCH extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class FrenchCHCustomizer extends LayoutCustomizer {
|
||||
private static class FrenchCHCustomizer extends FrenchCustomizer {
|
||||
public FrenchCHCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
super.setAccentedLetters(builder);
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"\u00E9", "\u00E8", "\u00EA", "\u00EB", "3", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "\u00F9", "\u00FB", "7", "\u00FC", "\u00FA", "\u016B")
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "\u00EE", "8", "\u00EF", "\u00EC", "\u00ED", "\u012F",
|
||||
"\u012B")
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"\u00F4", "\u0153", "9", "\u00F6", "\u00F2", "\u00F3", "\u00F5",
|
||||
"\u00F8", "\u014D", "\u00BA")
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
.replaceKeyOfLabel(Swiss.ROW1_11, key("\u00E8", moreKey("\u00FC")))
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
// U+00AA: "ª" FEMININE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E0", "\u00E2", "\u00E6", "\u00E1", "\u00E4", "\u00E3", "\u00E5",
|
||||
"\u0101", "\u00AA")
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
.replaceKeyOfLabel(Swiss.ROW2_10, key("\u00E9", moreKey("\u00F6")))
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
.replaceKeyOfLabel(Swiss.ROW2_11, key("\u00E0", moreKey("\u00E4")))
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "\u00FF")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
// U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
|
||||
// U+010D: "č" LATIN SMALL LETTER C WITH CARON
|
||||
.setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D");
|
||||
.replaceKeyOfLabel(Swiss.ROW2_11, key("\u00E0", moreKey("\u00E4")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,9 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwertz;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
import com.android.inputmethod.keyboard.layout.tests.TestsFrench.FrenchEuroCustomizer;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -31,71 +30,8 @@ import java.util.Locale;
|
|||
@SmallTest
|
||||
public final class TestsFrenchQwertz extends LayoutTestsBase {
|
||||
private static final Locale LOCALE = new Locale("fr");
|
||||
private static final LayoutBase LAYOUT = new Qwertz(new FrenchQwertzCustomizer(LOCALE));
|
||||
private static final LayoutBase LAYOUT = new Qwertz(new FrenchEuroCustomizer(LOCALE));
|
||||
|
||||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class FrenchQwertzCustomizer extends EuroLayoutCustomizer {
|
||||
public FrenchQwertzCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"\u00E9", "\u00E8", "\u00EA", "\u00EB", "3", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "\u00F9", "\u00FB", "7", "\u00FC", "\u00FA", "\u016B")
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "\u00EE", "8", "\u00EF", "\u00EC", "\u00ED", "\u012F",
|
||||
"\u012B")
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"\u00F4", "\u0153", "9", "\u00F6", "\u00F2", "\u00F3", "\u00F5",
|
||||
"\u00F8", "\u014D", "\u00BA")
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
// U+00AA: "ª" FEMININE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E0", "\u00E2", "\u00E6", "\u00E1", "\u00E4", "\u00E3", "\u00E5",
|
||||
"\u0101", "\u00AA")
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "\u00FF")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
// U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
|
||||
// U+010D: "č" LATIN SMALL LETTER C WITH CARON
|
||||
.setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,11 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwertz;
|
||||
import com.android.inputmethod.keyboard.layout.Symbols;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -33,70 +31,25 @@ import java.util.Locale;
|
|||
@SmallTest
|
||||
public final class TestsGerman extends LayoutTestsBase {
|
||||
private static final Locale LOCALE = new Locale("de");
|
||||
private static final LayoutBase LAYOUT = new Qwertz(new GermanCustomizer(LOCALE));
|
||||
private static final LayoutBase LAYOUT = new Qwertz(new GermanEuroCustomizer(LOCALE));
|
||||
|
||||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class GermanCustomizer extends EuroLayoutCustomizer {
|
||||
public GermanCustomizer(final Locale locale) { super(locale); }
|
||||
static class GermanEuroCustomizer extends GermanCustomizer {
|
||||
final EuroCustomizer mEuroCustomizer;
|
||||
|
||||
public GermanEuroCustomizer(final Locale locale) {
|
||||
super(locale);
|
||||
mEuroCustomizer = new EuroCustomizer(locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
|
||||
public ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_R9L; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
.setMoreKeysOf("e", "3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0117")
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F6", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D")
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E4", "\u00E2", "\u00E0", "\u00E1", "\u00E6", "\u00E3", "\u00E5",
|
||||
"\u0101")
|
||||
// U+00DF: "ß" LATIN SMALL LETTER SHARP S
|
||||
// U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
|
||||
// U+0161: "š" LATIN SMALL LETTER S WITH CARON
|
||||
.setMoreKeysOf("s", "\u00DF", "\u015B", "\u0161")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
// U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
|
||||
.setMoreKeysOf("n", "\u00F1", "\u0144");
|
||||
public ExpectedKey[] getOtherCurrencyKeys() {
|
||||
return mEuroCustomizer.getOtherCurrencyKeys();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Swiss;
|
||||
import com.android.inputmethod.keyboard.layout.Symbols;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
@ -38,74 +35,22 @@ public final class TestsGermanCH extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class GermanCHCustomizer extends LayoutCustomizer {
|
||||
private static class GermanCHCustomizer extends GermanCustomizer {
|
||||
public GermanCHCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_R9L; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
super.setAccentedLetters(builder);
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
.setMoreKeysOf("e", "3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0117")
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F6", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D")
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
.replaceKeyOfLabel(Swiss.ROW1_11, key("\u00FC", moreKey("\u00E8")))
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E4", "\u00E2", "\u00E0", "\u00E1", "\u00E6", "\u00E3", "\u00E5",
|
||||
"\u0101")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
.replaceKeyOfLabel(Swiss.ROW2_10, key("\u00F6", moreKey("\u00E9")))
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
.replaceKeyOfLabel(Swiss.ROW2_11, key("\u00E4", moreKey("\u00E0")))
|
||||
// U+00DF: "ß" LATIN SMALL LETTER SHARP S
|
||||
// U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
|
||||
// U+0161: "š" LATIN SMALL LETTER S WITH CARON
|
||||
.setMoreKeysOf("s", "\u00DF", "\u015B", "\u0161")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
// U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
|
||||
.setMoreKeysOf("n", "\u00F1", "\u0144");
|
||||
.replaceKeyOfLabel(Swiss.ROW2_11, key("\u00E4", moreKey("\u00E0")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,11 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwerty;
|
||||
import com.android.inputmethod.keyboard.layout.Symbols;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
import com.android.inputmethod.keyboard.layout.tests.TestsGerman.GermanEuroCustomizer;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -33,70 +30,8 @@ import java.util.Locale;
|
|||
@SmallTest
|
||||
public final class TestsGermanQwerty extends LayoutTestsBase {
|
||||
private static final Locale LOCALE = new Locale("de");
|
||||
private static final LayoutBase LAYOUT = new Qwerty(new GermanQwertyCustomizer(LOCALE));
|
||||
private static final LayoutBase LAYOUT = new Qwerty(new GermanEuroCustomizer(LOCALE));
|
||||
|
||||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class GermanQwertyCustomizer extends EuroLayoutCustomizer {
|
||||
public GermanQwertyCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_R9L; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
.setMoreKeysOf("e", "3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0117")
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F6", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D")
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E4", "\u00E2", "\u00E0", "\u00E1", "\u00E6", "\u00E3", "\u00E5",
|
||||
"\u0101")
|
||||
// U+00DF: "ß" LATIN SMALL LETTER SHARP S
|
||||
// U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
|
||||
// U+0161: "š" LATIN SMALL LETTER S WITH CARON
|
||||
.setMoreKeysOf("s", "\u00DF", "\u015B", "\u0161")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
// U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
|
||||
.setMoreKeysOf("n", "\u00F1", "\u0144");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,24 +64,21 @@ public final class TestsHungarian extends LayoutTestsBase {
|
|||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
"\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u0171", "\u00FB", "\u00F9",
|
||||
"\u016B")
|
||||
.setMoreKeysOf("u", "\u00FA", "\u00FC", "\u0171", "\u00FB", "\u00F9", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "8", "\u00ED", "\u00EE", "\u00EF", "\u00EC", "\u012F",
|
||||
"\u012B")
|
||||
.setMoreKeysOf("i", "\u00ED", "\u00EE", "\u00EF", "\u00EC", "\u012F", "\u012B")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE
|
||||
|
@ -92,8 +89,8 @@ public final class TestsHungarian extends LayoutTestsBase {
|
|||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F3", "\u00F6", "\u0151", "\u00F4", "\u00F2", "\u00F5",
|
||||
"\u0153", "\u00F8", "\u014D")
|
||||
"\u00F3", "\u00F6", "\u0151", "\u00F4", "\u00F2", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
|
|
|
@ -58,27 +58,25 @@ public final class TestsIcelandic extends LayoutTestsBase {
|
|||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E9", "\u00EB", "\u00E8", "\u00EA", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
"\u00E9", "\u00EB", "\u00E8", "\u00EA", "\u0119", "\u0117", "\u0113")
|
||||
// U+00FE: "þ" LATIN SMALL LETTER THORN
|
||||
.setMoreKeysOf("t", "5", "\u00FE")
|
||||
.setMoreKeysOf("t", "\u00FE")
|
||||
// U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "6", "\u00FD", "\u00FF")
|
||||
.setMoreKeysOf("y", "\u00FD", "\u00FF")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B")
|
||||
.setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "8", "\u00ED", "\u00EF", "\u00EE", "\u00EC", "\u012F",
|
||||
"\u012B")
|
||||
.setMoreKeysOf("i", "\u00ED", "\u00EF", "\u00EE", "\u00EC", "\u012F", "\u012B")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
|
@ -88,8 +86,8 @@ public final class TestsIcelandic extends LayoutTestsBase {
|
|||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D")
|
||||
"\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8",
|
||||
"\u014D")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
|
|
|
@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwerty;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
|
@ -36,7 +36,7 @@ public final class TestsItalian extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class ItalianCustomizer extends EuroLayoutCustomizer {
|
||||
private static class ItalianCustomizer extends EuroCustomizer {
|
||||
public ItalianCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
|
@ -50,22 +50,20 @@ public final class TestsItalian extends LayoutTestsBase {
|
|||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
"\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113")
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00F9", "\u00FA", "\u00FB", "\u00FC", "\u016B")
|
||||
.setMoreKeysOf("u", "\u00F9", "\u00FA", "\u00FB", "\u00FC", "\u016B")
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "8", "\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u012F",
|
||||
"\u012B")
|
||||
.setMoreKeysOf("i", "\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u012F", "\u012B")
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
|
@ -76,8 +74,8 @@ public final class TestsItalian extends LayoutTestsBase {
|
|||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F2", "\u00F3", "\u00F4", "\u00F6", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D", "\u00BA")
|
||||
"\u00F2", "\u00F3", "\u00F4", "\u00F6", "\u00F5", "\u0153", "\u00F8",
|
||||
"\u014D", "\u00BA")
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
|
|
|
@ -45,21 +45,21 @@ public final class TestsKazakh extends LayoutTestsBase {
|
|||
// U+0443: "у" CYRILLIC SMALL LETTER U
|
||||
// U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U
|
||||
// U+04B1: "ұ" CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE
|
||||
.setMoreKeysOf("\u0443", "3", "\u04AF", "\u04B1")
|
||||
.setMoreKeysOf("\u0443", "\u04AF", "\u04B1")
|
||||
// U+043A: "к" CYRILLIC SMALL LETTER KA
|
||||
// U+049B: "қ" CYRILLIC SMALL LETTER KA WITH DESCENDER
|
||||
.setMoreKeysOf("\u043A", "4", "\u049B")
|
||||
.setMoreKeysOf("\u043A", "\u049B")
|
||||
// U+0435: "е" CYRILLIC SMALL LETTER IE
|
||||
// U+0451: "ё" CYRILLIC SMALL LETTER IO
|
||||
.setMoreKeysOf("\u0435", "5", "\u0451")
|
||||
.setMoreKeysOf("\u0435", "\u0451")
|
||||
// U+043D: "н" CYRILLIC SMALL LETTER EN
|
||||
// U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER
|
||||
.setMoreKeysOf("\u043D", "6", "\u04A3")
|
||||
.setMoreKeysOf("\u043D", "\u04A3")
|
||||
// U+0433: "г" CYRILLIC SMALL LETTER GHE
|
||||
// U+0493: "ғ" CYRILLIC SMALL LETTER GHE WITH STROKE
|
||||
.setMoreKeysOf("\u0433", "7", "\u0493")
|
||||
.setMoreKeysOf("\u0433", "\u0493")
|
||||
// U+0449: "щ" CYRILLIC SMALL LETTER SHCHA
|
||||
.replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", moreKey("9")))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", additionalMoreKey("9")))
|
||||
// U+044B: "ы" CYRILLIC SMALL LETTER YERU
|
||||
// U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_2, key("\u044B", moreKey("\u0456")))
|
||||
|
@ -73,7 +73,7 @@ public final class TestsKazakh extends LayoutTestsBase {
|
|||
// U+04BB: "һ" CYRILLIC SMALL LETTER SHHA
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_11, key("\u044D", moreKey("\u04BB")))
|
||||
// U+0438: "и" CYRILLIC SMALL LETTER I
|
||||
.replaceKeyOfLabel(EastSlavic.ROW3_5, key("\u0438"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW3_5, "\u0438")
|
||||
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
|
||||
.setMoreKeysOf("\u044C", "\u044A");
|
||||
|
|
|
@ -44,24 +44,24 @@ public final class TestsKyrgyz extends LayoutTestsBase {
|
|||
return builder
|
||||
// U+0443: "у" CYRILLIC SMALL LETTER U
|
||||
// U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U
|
||||
.setMoreKeysOf("\u0443", "3", "\u04AF")
|
||||
.setMoreKeysOf("\u0443", "\u04AF")
|
||||
// U+0435: "е" CYRILLIC SMALL LETTER IE
|
||||
// U+0451: "ё" CYRILLIC SMALL LETTER IO
|
||||
.setMoreKeysOf("\u0435", "5", "\u0451")
|
||||
.setMoreKeysOf("\u0435", "\u0451")
|
||||
// U+043D: "н" CYRILLIC SMALL LETTER EN
|
||||
// U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER
|
||||
.setMoreKeysOf("\u043D", "6", "\u04A3")
|
||||
.setMoreKeysOf("\u043D", "\u04A3")
|
||||
// U+0449: "щ" CYRILLIC SMALL LETTER SHCHA
|
||||
.replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", moreKey("9")))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", additionalMoreKey("9")))
|
||||
// U+044B: "ы" CYRILLIC SMALL LETTER YERU
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_2, key("\u044B"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_2, "\u044B")
|
||||
// U+043E: "о" CYRILLIC SMALL LETTER O
|
||||
// U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O
|
||||
.setMoreKeysOf("\u043E", "\u04E9")
|
||||
// U+044D: "э" CYRILLIC SMALL LETTER E
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_11, key("\u044D"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_11, "\u044D")
|
||||
// U+0438: "и" CYRILLIC SMALL LETTER I
|
||||
.replaceKeyOfLabel(EastSlavic.ROW3_5, key("\u0438"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW3_5, "\u0438")
|
||||
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
|
||||
.setMoreKeysOf("\u044C", "\u044A");
|
||||
|
|
|
@ -59,18 +59,18 @@ public final class TestsLatvian extends LayoutTestsBase {
|
|||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+011B: "ě" LATIN SMALL LETTER E WITH CARON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u0113", "\u0117", "\u00E8", "\u00E9", "\u00EA", "\u00EB",
|
||||
"\u0119", "\u011B")
|
||||
"\u0113", "\u0117", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0119",
|
||||
"\u011B")
|
||||
// U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA
|
||||
// U+0159: "ř" LATIN SMALL LETTER R WITH CARON
|
||||
// U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE
|
||||
.setMoreKeysOf("r", "4", "\u0157", "\u0159", "\u0155")
|
||||
.setMoreKeysOf("r", "\u0157", "\u0159", "\u0155")
|
||||
// U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA
|
||||
// U+0165: "ť" LATIN SMALL LETTER T WITH CARON
|
||||
.setMoreKeysOf("t", "5", "\u0163", "\u0165")
|
||||
.setMoreKeysOf("t", "\u0163", "\u0165")
|
||||
// U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "6", "\u00FD", "\u00FF")
|
||||
.setMoreKeysOf("y", "\u00FD", "\u00FF")
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
// U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
|
@ -80,8 +80,8 @@ public final class TestsLatvian extends LayoutTestsBase {
|
|||
// U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE
|
||||
// U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE
|
||||
.setMoreKeysOf("u",
|
||||
"7", "\u016B", "\u0173", "\u00F9", "\u00FA", "\u00FB", "\u00FC",
|
||||
"\u016F", "\u0171")
|
||||
"\u016B", "\u0173", "\u00F9", "\u00FA", "\u00FB", "\u00FC", "\u016F",
|
||||
"\u0171")
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
|
@ -90,8 +90,7 @@ public final class TestsLatvian extends LayoutTestsBase {
|
|||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+0131: "ı" LATIN SMALL LETTER DOTLESS I
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u012B", "\u012F", "\u00EC", "\u00ED", "\u00EE", "\u00EF",
|
||||
"\u0131")
|
||||
"\u012B", "\u012F", "\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u0131")
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
|
@ -101,8 +100,8 @@ public final class TestsLatvian extends LayoutTestsBase {
|
|||
// U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F2", "\u00F3", "\u00F4", "\u00F5", "\u00F6", "\u0153",
|
||||
"\u0151", "\u00F8")
|
||||
"\u00F2", "\u00F3", "\u00F4", "\u00F5", "\u00F6", "\u0153", "\u0151",
|
||||
"\u00F8")
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
|
|
|
@ -59,18 +59,18 @@ public final class TestsLithuanian extends LayoutTestsBase {
|
|||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+011B: "ě" LATIN SMALL LETTER E WITH CARON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u0117", "\u0119", "\u0113", "\u00E8", "\u00E9", "\u00EA",
|
||||
"\u00EB", "\u011B")
|
||||
"\u0117", "\u0119", "\u0113", "\u00E8", "\u00E9", "\u00EA", "\u00EB",
|
||||
"\u011B")
|
||||
// U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA
|
||||
// U+0159: "ř" LATIN SMALL LETTER R WITH CARON
|
||||
// U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE
|
||||
.setMoreKeysOf("r", "4", "\u0157", "\u0159", "\u0155")
|
||||
.setMoreKeysOf("r", "\u0157", "\u0159", "\u0155")
|
||||
// U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA
|
||||
// U+0165: "ť" LATIN SMALL LETTER T WITH CARON
|
||||
.setMoreKeysOf("t", "5", "\u0163", "\u0165")
|
||||
.setMoreKeysOf("t", "\u0163", "\u0165")
|
||||
// U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "6", "\u00FD", "\u00FF")
|
||||
.setMoreKeysOf("y", "\u00FD", "\u00FF")
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
// U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
|
@ -81,8 +81,8 @@ public final class TestsLithuanian extends LayoutTestsBase {
|
|||
// U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE
|
||||
// U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE
|
||||
.setMoreKeysOf("u",
|
||||
"7", "\u016B", "\u0173", "\u00FC", "\u016B", "\u00F9", "\u00FA",
|
||||
"\u00FB", "\u016F", "\u0171")
|
||||
"\u016B", "\u0173", "\u00FC", "\u016B", "\u00F9", "\u00FA", "\u00FB",
|
||||
"\u016F", "\u0171")
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
|
@ -91,8 +91,7 @@ public final class TestsLithuanian extends LayoutTestsBase {
|
|||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+0131: "ı" LATIN SMALL LETTER DOTLESS I
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u012F", "\u012B", "\u00EC", "\u00ED", "\u00EE", "\u00EF",
|
||||
"\u0131")
|
||||
"\u012F", "\u012B", "\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u0131")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
|
@ -102,8 +101,8 @@ public final class TestsLithuanian extends LayoutTestsBase {
|
|||
// U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F6", "\u00F5", "\u00F2", "\u00F3", "\u00F4", "\u0153",
|
||||
"\u0151", "\u00F8")
|
||||
"\u00F6", "\u00F5", "\u00F2", "\u00F3", "\u00F4", "\u0153", "\u0151",
|
||||
"\u00F8")
|
||||
// U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
|
|
|
@ -52,18 +52,18 @@ public final class TestsMacedonian extends LayoutTestsBase {
|
|||
return builder
|
||||
// U+0435: "е" CYRILLIC SMALL LETTER IE
|
||||
// U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE
|
||||
.setMoreKeysOf("\u0435", "3", "\u0450")
|
||||
.setMoreKeysOf("\u0435", "\u0450")
|
||||
// U+0455: "ѕ" CYRILLIC SMALL LETTER DZE
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW1_6, key("\u0455", moreKey("6")))
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW1_6, key("\u0455", additionalMoreKey("6")))
|
||||
// U+0438: "и" CYRILLIC SMALL LETTER I
|
||||
// U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE
|
||||
.setMoreKeysOf("\u0438", "8", "\u045D")
|
||||
.setMoreKeysOf("\u0438", "\u045D")
|
||||
// U+045C: "ќ" CYRILLIC SMALL LETTER KJE
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW2_11, key("\u045C"))
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW2_11, "\u045C")
|
||||
// U+0437: "з" CYRILLIC SMALL LETTER ZE
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW3_1, key("\u0437"))
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW3_1, "\u0437")
|
||||
// U+0453: "ѓ" CYRILLIC SMALL LETTER GJE
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW3_8, key("\u0453"));
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW3_8, "\u0453");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public final class TestsNoLanguage extends LayoutTestsBase {
|
|||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX
|
||||
.setMoreKeysOf("w", "2", "\u0175")
|
||||
.setMoreKeysOf("w", "\u0175")
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
|
@ -54,22 +54,22 @@ public final class TestsNoLanguage extends LayoutTestsBase {
|
|||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+011B: "ě" LATIN SMALL LETTER E WITH CARON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113", "\u0115",
|
||||
"\u0117", "\u0119", "\u011B")
|
||||
"\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113", "\u0115", "\u0117",
|
||||
"\u0119", "\u011B")
|
||||
// U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE
|
||||
// U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA
|
||||
// U+0159: "ř" LATIN SMALL LETTER R WITH CARON
|
||||
.setMoreKeysOf("r", "4", "\u0155", "\u0157", "\u0159")
|
||||
.setMoreKeysOf("r", "\u0155", "\u0157", "\u0159")
|
||||
// U+00FE: "þ" LATIN SMALL LETTER THORN
|
||||
// U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA
|
||||
// U+0165: "ť" LATIN SMALL LETTER T WITH CARON
|
||||
// U+0167: "ŧ" LATIN SMALL LETTER T WITH STROKE
|
||||
.setMoreKeysOf("t", "5", "\u00FE", "\u0163", "\u0165", "\u0167")
|
||||
.setMoreKeysOf("t", "\u00FE", "\u0163", "\u0165", "\u0167")
|
||||
// U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
|
||||
// U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
// U+0133: "ij" LATIN SMALL LIGATURE IJ
|
||||
.setMoreKeysOf("y", "6", "\u00FD", "\u0177", "\u00FF", "\u0133")
|
||||
.setMoreKeysOf("y", "\u00FD", "\u0177", "\u00FF", "\u0133")
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
|
@ -81,8 +81,8 @@ public final class TestsNoLanguage extends LayoutTestsBase {
|
|||
// U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE
|
||||
// U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK
|
||||
.setMoreKeysOf("u",
|
||||
"7", "\u00F9", "\u00FA", "\u00FB", "\u00FC", "\u0169", "\u016B",
|
||||
"\u016D", "\u016F", "\u0171", "\u0173")
|
||||
"\u00F9", "\u00FA", "\u00FB", "\u00FC", "\u0169", "\u016B", "\u016D",
|
||||
"\u016F", "\u0171", "\u0173")
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
|
@ -94,8 +94,8 @@ public final class TestsNoLanguage extends LayoutTestsBase {
|
|||
// U+0131: "ı" LATIN SMALL LETTER DOTLESS I
|
||||
// U+0133: "ij" LATIN SMALL LIGATURE IJ
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u0129", "\u012B",
|
||||
"\u012D", "\u012F", "\u0131", "\u0133")
|
||||
"\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u0129", "\u012B", "\u012D",
|
||||
"\u012F", "\u0131", "\u0133")
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
|
@ -108,8 +108,8 @@ public final class TestsNoLanguage extends LayoutTestsBase {
|
|||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F2", "\u00F3", "\u00F4", "\u00F5", "\u00F6", "\u00F8",
|
||||
"\u014D", "\u014F", "\u0151", "\u0153", "\u00BA")
|
||||
"\u00F2", "\u00F3", "\u00F4", "\u00F5", "\u00F6", "\u00F8", "\u014D",
|
||||
"\u014F", "\u0151", "\u0153", "\u00BA")
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
|
|
|
@ -58,14 +58,13 @@ public final class TestsNorwegian extends LayoutTestsBase {
|
|||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
"\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113")
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
|
||||
.setMoreKeysOf("u", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
|
@ -74,10 +73,9 @@ public final class TestsNorwegian extends LayoutTestsBase {
|
|||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F4", "\u00F2", "\u00F3", "\u00F6", "\u00F5", "\u0153",
|
||||
"\u014D")
|
||||
"\u00F4", "\u00F2", "\u00F3", "\u00F6", "\u00F5", "\u0153", "\u014D")
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
.replaceKeyOfLabel(Nordic.ROW1_11, key("\u00E5"))
|
||||
.replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
.replaceKeyOfLabel(Nordic.ROW2_10, key("\u00F8", moreKey("\u00F6")))
|
||||
|
|
|
@ -58,8 +58,7 @@ public final class TestsPolish extends LayoutTestsBase {
|
|||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u0119", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0117",
|
||||
"\u0113")
|
||||
"\u0119", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0117", "\u0113")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
|
@ -69,8 +68,8 @@ public final class TestsPolish extends LayoutTestsBase {
|
|||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153",
|
||||
"\u00F8", "\u014D")
|
||||
"\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8",
|
||||
"\u014D")
|
||||
// U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
|
|
|
@ -19,9 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwerty;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -31,69 +29,8 @@ import java.util.Locale;
|
|||
@SmallTest
|
||||
public class TestsPortugueseBR extends LayoutTestsBase {
|
||||
private static final Locale LOCALE = new Locale("pt", "BR");
|
||||
private static final LayoutBase LAYOUT = new Qwerty(new PortugueseBRCustomizer(LOCALE));
|
||||
private static final LayoutBase LAYOUT = new Qwerty(new PortugueseCustomizer(LOCALE));
|
||||
|
||||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
// TODO: Make this as generic Portuguese customizer.
|
||||
static class PortugueseBRCustomizer extends LayoutCustomizer {
|
||||
public PortugueseBRCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E9", "\u00EA", "\u00E8", "\u0119", "\u0117", "\u0113",
|
||||
"\u00EB")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "8", "\u00ED", "\u00EE", "\u00EC", "\u00EF", "\u012F",
|
||||
"\u012B")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F3", "\u00F5", "\u00F4", "\u00F2", "\u00F6", "\u0153",
|
||||
"\u00F8", "\u014D", "\u00BA")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+00AA: "ª" FEMININE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E1", "\u00E3", "\u00E0", "\u00E2", "\u00E4", "\u00E5", "\u00E6",
|
||||
"\u00AA")
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
// U+010D: "č" LATIN SMALL LETTER C WITH CARON
|
||||
// U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
|
||||
.setMoreKeysOf("c", "\u00E7", "\u010D", "\u0107");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwerty;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -36,17 +36,20 @@ public final class TestsPortuguesePT extends TestsPortugueseBR {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class PortuguesePTCustomizer extends EuroLayoutCustomizer {
|
||||
private final PortugueseBRCustomizer mPortugueseCustomizer;
|
||||
private static class PortuguesePTCustomizer extends PortugueseCustomizer {
|
||||
private final EuroCustomizer mEuroCustomizer;
|
||||
|
||||
public PortuguesePTCustomizer(final Locale locale) {
|
||||
super(locale);
|
||||
mPortugueseCustomizer = new PortugueseBRCustomizer(locale);
|
||||
mEuroCustomizer = new EuroCustomizer(locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return mPortugueseCustomizer.setAccentedLetters(builder);
|
||||
public ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getOtherCurrencyKeys() {
|
||||
return mEuroCustomizer.getOtherCurrencyKeys();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,15 +51,14 @@ public final class TestsRomanian extends LayoutTestsBase {
|
|||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+021B: "ț" LATIN SMALL LETTER T WITH COMMA BELOW
|
||||
.setMoreKeysOf("t", "5", "\u021B")
|
||||
.setMoreKeysOf("t", "\u021B")
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "8", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F",
|
||||
"\u012B")
|
||||
.setMoreKeysOf("i", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F", "\u012B")
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+0103: "ă" LATIN SMALL LETTER A WITH BREVE
|
||||
|
|
|
@ -52,15 +52,15 @@ public final class TestsRussian extends LayoutTestsBase {
|
|||
return builder
|
||||
// U+0435: "е" CYRILLIC SMALL LETTER IE
|
||||
// U+0451: "ё" CYRILLIC SMALL LETTER IO
|
||||
.setMoreKeysOf("\u0435", "5", "\u0451")
|
||||
.setMoreKeysOf("\u0435", "\u0451")
|
||||
// U+0449: "щ" CYRILLIC SMALL LETTER SHCHA
|
||||
.replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", moreKey("9")))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", additionalMoreKey("9")))
|
||||
// U+044B: "ы" CYRILLIC SMALL LETTER YERU
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_2, key("\u044B"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_2, "\u044B")
|
||||
// U+044D: "э" CYRILLIC SMALL LETTER E
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_11, key("\u044D"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_11, "\u044D")
|
||||
// U+0438: "и" CYRILLIC SMALL LETTER I
|
||||
.replaceKeyOfLabel(EastSlavic.ROW3_5, key("\u0438"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW3_5, "\u0438")
|
||||
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
|
||||
.setMoreKeysOf("\u044C", "\u044A");
|
||||
|
|
|
@ -58,18 +58,18 @@ public final class TestsSerbian extends LayoutTestsBase {
|
|||
return builder
|
||||
// U+0435: "е" CYRILLIC SMALL LETTER IE
|
||||
// U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE
|
||||
.setMoreKeysOf("\u0435", "3", "\u0450")
|
||||
.setMoreKeysOf("\u0435", "\u0450")
|
||||
// U+0437: "з" CYRILLIC SMALL LETTER ZE
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW1_6, key("\u0437", moreKey("6")))
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW1_6, key("\u0437", additionalMoreKey("6")))
|
||||
// U+0438: "и" CYRILLIC SMALL LETTER I
|
||||
// U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE
|
||||
.setMoreKeysOf("\u0438", "8", "\u045D")
|
||||
.setMoreKeysOf("\u0438", "\u045D")
|
||||
// U+045B: "ћ" CYRILLIC SMALL LETTER TSHE
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW2_11, key("\u045B"))
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW2_11, "\u045B")
|
||||
// U+0455: "ѕ" CYRILLIC SMALL LETTER DZE
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW3_1, key("\u0455"))
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW3_1, "\u0455")
|
||||
// U+0452: "ђ" CYRILLIC SMALL LETTER DJE
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW3_8, key("\u0452"));
|
||||
.replaceKeyOfLabel(SouthSlavic.ROW3_8, "\u0452");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwerty;
|
||||
import com.android.inputmethod.keyboard.layout.Symbols;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
|
@ -38,7 +38,7 @@ public final class TestsSlovak extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class SlovakCustomizer extends EuroLayoutCustomizer {
|
||||
private static class SlovakCustomizer extends EuroCustomizer {
|
||||
public SlovakCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
|
@ -65,18 +65,18 @@ public final class TestsSlovak extends LayoutTestsBase {
|
|||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E9", "\u011B", "\u0113", "\u0117", "\u00E8", "\u00EA",
|
||||
"\u00EB", "\u0119")
|
||||
"\u00E9", "\u011B", "\u0113", "\u0117", "\u00E8", "\u00EA", "\u00EB",
|
||||
"\u0119")
|
||||
// U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE
|
||||
// U+0159: "ř" LATIN SMALL LETTER R WITH CARON
|
||||
// U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA
|
||||
.setMoreKeysOf("r", "4", "\u0155", "\u0159", "\u0157")
|
||||
.setMoreKeysOf("r", "\u0155", "\u0159", "\u0157")
|
||||
// U+0165: "ť" LATIN SMALL LETTER T WITH CARON
|
||||
// U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA
|
||||
.setMoreKeysOf("t", "5", "\u0165", "\u0163")
|
||||
.setMoreKeysOf("t", "\u0165", "\u0163")
|
||||
// U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "6", "\u00FD", "\u00FF")
|
||||
.setMoreKeysOf("y", "\u00FD", "\u00FF")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
|
@ -86,8 +86,8 @@ public final class TestsSlovak extends LayoutTestsBase {
|
|||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE
|
||||
.setMoreKeysOf("u",
|
||||
"7", "\u00FA", "\u016F", "\u00FC", "\u016B", "\u0173", "\u00F9",
|
||||
"\u00FB", "\u0171")
|
||||
"\u00FA", "\u016F", "\u00FC", "\u016B", "\u0173", "\u00F9", "\u00FB",
|
||||
"\u0171")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
|
@ -96,8 +96,7 @@ public final class TestsSlovak extends LayoutTestsBase {
|
|||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+0131: "ı" LATIN SMALL LETTER DOTLESS I
|
||||
.setMoreKeysOf("i",
|
||||
"8", "\u00ED", "\u012B", "\u012F", "\u00EC", "\u00EE", "\u00EF",
|
||||
"\u0131")
|
||||
"\u00ED", "\u012B", "\u012F", "\u00EC", "\u00EE", "\u00EF", "\u0131")
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
|
@ -107,8 +106,8 @@ public final class TestsSlovak extends LayoutTestsBase {
|
|||
// U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F4", "\u00F3", "\u00F6", "\u00F2", "\u00F5", "\u0153",
|
||||
"\u0151", "\u00F8")
|
||||
"\u00F4", "\u00F3", "\u00F6", "\u00F2", "\u00F5", "\u0153", "\u0151",
|
||||
"\u00F8")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
|
|
|
@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwerty;
|
||||
import com.android.inputmethod.keyboard.layout.Symbols;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
|
@ -38,7 +38,7 @@ public final class TestsSlovenian extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class SlovenianCustomizer extends EuroLayoutCustomizer {
|
||||
private static class SlovenianCustomizer extends EuroCustomizer {
|
||||
public SlovenianCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,11 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Spanish;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
import com.android.inputmethod.keyboard.layout.tests.TestsSpanishUS.SpanishUSCustomizer;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -38,22 +36,20 @@ public class TestsSpanish extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class SpanishESCustomizer extends EuroLayoutCustomizer {
|
||||
private final SpanishUSCustomizer mSpanishUSCustomizer;
|
||||
private static class SpanishESCustomizer extends SpanishCustomizer {
|
||||
private final EuroCustomizer mEuroCustomizer;
|
||||
|
||||
public SpanishESCustomizer(final Locale locale) {
|
||||
super(locale);
|
||||
mSpanishUSCustomizer = new SpanishUSCustomizer(locale);
|
||||
mEuroCustomizer = new EuroCustomizer(locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) {
|
||||
return mSpanishUSCustomizer.getPunctuationMoreKeys(isPhone);
|
||||
}
|
||||
public ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); }
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return mSpanishUSCustomizer.setAccentedLetters(builder);
|
||||
public ExpectedKey[] getOtherCurrencyKeys() {
|
||||
return mEuroCustomizer.getOtherCurrencyKeys();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Spanish;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -32,89 +29,8 @@ import java.util.Locale;
|
|||
@SmallTest
|
||||
public class TestsSpanishUS extends TestsSpanish {
|
||||
private static final Locale LOCALE = new Locale("es", "US");
|
||||
private static final LayoutBase LAYOUT = new Spanish(new SpanishUSCustomizer(LOCALE));
|
||||
private static final LayoutBase LAYOUT = new Spanish(new SpanishCustomizer(LOCALE));
|
||||
|
||||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
// Make this as generic Spanish customizer.
|
||||
static class SpanishUSCustomizer extends LayoutCustomizer {
|
||||
public SpanishUSCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) {
|
||||
return isPhone ? PHONE_PUNCTUATION_MORE_KEYS
|
||||
: LayoutBase.TABLET_PUNCTUATION_MORE_KEYS;
|
||||
}
|
||||
|
||||
// Punctuation more keys for phone form factor.
|
||||
private static final ExpectedKey[] PHONE_PUNCTUATION_MORE_KEYS = joinKeys(
|
||||
// U+00A1: "¡" INVERTED EXCLAMATION MARK
|
||||
// U+00BF: "¿" INVERTED QUESTION MARK
|
||||
"\u00A1", ";", "/", "(", ")", "#", "!", ",", "?",
|
||||
"\u00BF", "&", "%", "+", "\"", "-", ":", "'", "@");
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return builder
|
||||
// U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
|
||||
// U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
// U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E9", "\u00E8", "\u00EB", "\u00EA", "\u0119", "\u0117",
|
||||
"\u0113")
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "8", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F",
|
||||
"\u012B")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00BA: "º" MASCULINE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F3", "\u00F2", "\u00F6", "\u00F4", "\u00F5", "\u00F8",
|
||||
"\u0153", "\u014D", "\u00BA")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
// U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
|
||||
// U+00AA: "ª" FEMININE ORDINAL INDICATOR
|
||||
.setMoreKeysOf("a",
|
||||
"\u00E1", "\u00E0", "\u00E4", "\u00E2", "\u00E3", "\u00E5", "\u0105",
|
||||
"\u00E6", "\u0101", "\u00AA")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
.replaceKeyOfLabel(Spanish.ROW2_10, key("\u00F1"))
|
||||
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
|
||||
// U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
|
||||
// U+010D: "č" LATIN SMALL LETTER C WITH CARON
|
||||
.setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D")
|
||||
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
|
||||
// U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
|
||||
.setMoreKeysOf("n", "\u00F1", "\u0144");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,19 +47,19 @@ public final class TestsSwahili extends LayoutTestsBase {
|
|||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
|
||||
.setMoreKeysOf("e", "3", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113")
|
||||
.setMoreKeysOf("e", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113")
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FB", "\u00FC", "\u00F9", "\u00FA", "\u016B")
|
||||
.setMoreKeysOf("u", "\u00FB", "\u00FC", "\u00F9", "\u00FA", "\u016B")
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
.setMoreKeysOf("i", "8", "\u00EE", "\u00EF", "\u00ED", "\u012B", "\u00EC")
|
||||
.setMoreKeysOf("i", "\u00EE", "\u00EF", "\u00ED", "\u012B", "\u00EC")
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
|
@ -69,8 +69,8 @@ public final class TestsSwahili extends LayoutTestsBase {
|
|||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F4", "\u00F6", "\u00F2", "\u00F3", "\u0153", "\u00F8",
|
||||
"\u014D", "\u00F5")
|
||||
"\u00F4", "\u00F6", "\u00F2", "\u00F3", "\u0153", "\u00F8", "\u014D",
|
||||
"\u00F5")
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
|
|
|
@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Nordic;
|
||||
import com.android.inputmethod.keyboard.layout.Symbols;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
|
@ -38,7 +38,7 @@ public final class TestsSwedish extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class SwedishCustomizer extends EuroLayoutCustomizer {
|
||||
private static class SwedishCustomizer extends EuroCustomizer {
|
||||
public SwedishCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
|
@ -55,39 +55,39 @@ public final class TestsSwedish extends LayoutTestsBase {
|
|||
// U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
// U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
|
||||
// U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
|
||||
.setMoreKeysOf("e", "3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119")
|
||||
.setMoreKeysOf("e", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119")
|
||||
// U+0159: "ř" LATIN SMALL LETTER R WITH CARON
|
||||
.setMoreKeysOf("r", "4", "\u0159")
|
||||
.setMoreKeysOf("r", "\u0159")
|
||||
// U+0165: "ť" LATIN SMALL LETTER T WITH CARON
|
||||
// U+00FE: "þ" LATIN SMALL LETTER THORN
|
||||
.setMoreKeysOf("t", "5", "\u0165", "\u00FE")
|
||||
.setMoreKeysOf("t", "\u0165", "\u00FE")
|
||||
// U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
|
||||
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
.setMoreKeysOf("y", "6", "\u00FD", "\u00FF")
|
||||
.setMoreKeysOf("y", "\u00FD", "\u00FF")
|
||||
// U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FC", "\u00FA", "\u00F9", "\u00FB", "\u016B")
|
||||
.setMoreKeysOf("u", "\u00FC", "\u00FA", "\u00F9", "\u00FB", "\u016B")
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
.setMoreKeysOf("i", "8", "\u00ED", "\u00EC", "\u00EE", "\u00EF")
|
||||
.setMoreKeysOf("i", "\u00ED", "\u00EC", "\u00EE", "\u00EF")
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
// U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o", "9", "\u00F3", "\u00F2", "\u00F4", "\u00F5", "\u014D")
|
||||
.setMoreKeysOf("o", "\u00F3", "\u00F2", "\u00F4", "\u00F5", "\u014D")
|
||||
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
|
||||
.replaceKeyOfLabel(Nordic.ROW1_11, key("\u00E5"))
|
||||
.replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+0153: "œ" LATIN SMALL LIGATURE OE
|
||||
.replaceKeyOfLabel(Nordic.ROW2_10, key("\u00F6",
|
||||
moreKey("\u00F8"), moreKey("\u0153")))
|
||||
.replaceKeyOfLabel(Nordic.ROW2_10,
|
||||
key("\u00F6", joinMoreKeys("\u00F8", "\u0153")))
|
||||
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
|
||||
// U+00E6: "æ" LATIN SMALL LETTER AE
|
||||
.replaceKeyOfLabel(Nordic.ROW2_11, key("\u00E4", moreKey("\u00E6")))
|
||||
|
|
|
@ -19,10 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Spanish;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
import com.android.inputmethod.keyboard.layout.tests.TestsSpanishUS.SpanishUSCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -37,17 +35,16 @@ public class TestsTagalog extends TestsSpanish {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class TagalogCustomizer extends LayoutCustomizer {
|
||||
private final SpanishUSCustomizer mSpanishUSCustomizer;
|
||||
private static class TagalogCustomizer extends SpanishCustomizer {
|
||||
|
||||
public TagalogCustomizer(final Locale locale) {
|
||||
super(locale);
|
||||
mSpanishUSCustomizer = new SpanishUSCustomizer(locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
|
||||
return mSpanishUSCustomizer.setAccentedLetters(builder);
|
||||
public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) {
|
||||
return isPhone ? LayoutBase.PHONE_PUNCTUATION_MORE_KEYS
|
||||
: LayoutBase.TABLET_PUNCTUATION_MORE_KEYS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests;
|
|||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
|
||||
import com.android.inputmethod.keyboard.layout.Qwerty;
|
||||
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
|
||||
|
||||
|
@ -36,7 +36,7 @@ public final class TestsTurkish extends LayoutTestsBase {
|
|||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
||||
private static class TurkishCustomizer extends EuroLayoutCustomizer {
|
||||
private static class TurkishCustomizer extends EuroCustomizer {
|
||||
public TurkishCustomizer(final Locale locale) { super(locale); }
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +47,7 @@ public final class TestsTurkish extends LayoutTestsBase {
|
|||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
|
||||
.setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
|
||||
.setMoreKeysOf("u", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
|
||||
// U+0131: "ı" LATIN SMALL LETTER DOTLESS I
|
||||
// U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
// U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
|
||||
|
@ -55,7 +55,7 @@ public final class TestsTurkish extends LayoutTestsBase {
|
|||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
|
||||
// U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
|
||||
.setMoreKeysOf("i", "8",
|
||||
.setMoreKeysOf("i",
|
||||
"\u0131", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F", "\u012B")
|
||||
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
|
||||
// U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
|
@ -66,8 +66,8 @@ public final class TestsTurkish extends LayoutTestsBase {
|
|||
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
|
||||
// U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F6", "\u00F4", "\u0153", "\u00F2", "\u00F3", "\u00F5",
|
||||
"\u00F8", "\u014D")
|
||||
"\u00F6", "\u00F4", "\u0153", "\u00F2", "\u00F3", "\u00F5", "\u00F8",
|
||||
"\u014D")
|
||||
// U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
.setMoreKeysOf("a", "\u00E2")
|
||||
// U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA
|
||||
|
|
|
@ -65,16 +65,16 @@ public final class TestsUkrainian extends LayoutTestsBase {
|
|||
return builder
|
||||
// U+0433: "г" CYRILLIC SMALL LETTER GHE
|
||||
// U+0491: "ґ" CYRILLIC SMALL LETTER GHE WITH UPTURN
|
||||
.setMoreKeysOf("\u0433", "7", "\u0491")
|
||||
.setMoreKeysOf("\u0433", "\u0491")
|
||||
// U+0449: "щ" CYRILLIC SMALL LETTER SHCHA
|
||||
.replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", moreKey("9")))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", additionalMoreKey("9")))
|
||||
// U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
// U+0457: "ї" CYRILLIC SMALL LETTER YI
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_2, key("\u0456", moreKey("\u0457")))
|
||||
// U+0454: "є" CYRILLIC SMALL LETTER UKRAINIAN IE
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_11, key("\u0454"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW2_11, "\u0454")
|
||||
// U+0438: "и" CYRILLIC SMALL LETTER I
|
||||
.replaceKeyOfLabel(EastSlavic.ROW3_5, key("\u0438"))
|
||||
.replaceKeyOfLabel(EastSlavic.ROW3_5, "\u0438")
|
||||
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
|
||||
.setMoreKeysOf("\u044C", "\u044A");
|
||||
|
|
|
@ -71,14 +71,14 @@ public final class TestsVietnamese extends LayoutTestsBase {
|
|||
// U+1EC5: "ễ" LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE
|
||||
// U+1EC7: "ệ" LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW
|
||||
.setMoreKeysOf("e",
|
||||
"3", "\u00E8", "\u00E9", "\u1EBB", "\u1EBD", "\u1EB9", "\u00EA",
|
||||
"\u1EC1", "\u1EBF", "\u1EC3", "\u1EC5", "\u1EC7")
|
||||
"\u00E8", "\u00E9", "\u1EBB", "\u1EBD", "\u1EB9", "\u00EA", "\u1EC1",
|
||||
"\u1EBF", "\u1EC3", "\u1EC5", "\u1EC7")
|
||||
// U+1EF3: "ỳ" LATIN SMALL LETTER Y WITH GRAVE
|
||||
// U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
|
||||
// U+1EF7: "ỷ" LATIN SMALL LETTER Y WITH HOOK ABOVE
|
||||
// U+1EF9: "ỹ" LATIN SMALL LETTER Y WITH TILDE
|
||||
// U+1EF5: "ỵ" LATIN SMALL LETTER Y WITH DOT BELOW
|
||||
.setMoreKeysOf("y", "6", "\u1EF3", "\u00FD", "\u1EF7", "\u1EF9", "\u1EF5")
|
||||
.setMoreKeysOf("y", "\u1EF3", "\u00FD", "\u1EF7", "\u1EF9", "\u1EF5")
|
||||
// U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
|
||||
// U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
|
||||
// U+1EE7: "ủ" LATIN SMALL LETTER U WITH HOOK ABOVE
|
||||
|
@ -91,14 +91,14 @@ public final class TestsVietnamese extends LayoutTestsBase {
|
|||
// U+1EEF: "ữ" LATIN SMALL LETTER U WITH HORN AND TILDE
|
||||
// U+1EF1: "ự" LATIN SMALL LETTER U WITH HORN AND DOT BELOW
|
||||
.setMoreKeysOf("u",
|
||||
"7", "\u00F9", "\u00FA", "\u1EE7", "\u0169", "\u1EE5", "\u01B0",
|
||||
"\u1EEB", "\u1EE9", "\u1EED", "\u1EEF", "\u1EF1")
|
||||
"\u00F9", "\u00FA", "\u1EE7", "\u0169", "\u1EE5", "\u01B0", "\u1EEB",
|
||||
"\u1EE9", "\u1EED", "\u1EEF", "\u1EF1")
|
||||
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
|
||||
// U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
|
||||
// U+1EC9: "ỉ" LATIN SMALL LETTER I WITH HOOK ABOVE
|
||||
// U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE
|
||||
// U+1ECB: "ị" LATIN SMALL LETTER I WITH DOT BELOW
|
||||
.setMoreKeysOf("i", "8", "\u00EC", "\u00ED", "\u1EC9", "\u0129", "\u1ECB")
|
||||
.setMoreKeysOf("i", "\u00EC", "\u00ED", "\u1EC9", "\u0129", "\u1ECB")
|
||||
// U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
|
||||
// U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
|
||||
// U+1ECF: "ỏ" LATIN SMALL LETTER O WITH HOOK ABOVE
|
||||
|
@ -117,9 +117,9 @@ public final class TestsVietnamese extends LayoutTestsBase {
|
|||
// U+1EE1: "ỡ" LATIN SMALL LETTER O WITH HORN AND TILDE
|
||||
// U+1EE3: "ợ" LATIN SMALL LETTER O WITH HORN AND DOT BELOW
|
||||
.setMoreKeysOf("o",
|
||||
"9", "\u00F2", "\u00F3", "\u1ECF", "\u00F5", "\u1ECD", "\u00F4",
|
||||
"\u1ED3", "\u1ED1", "\u1ED5", "\u1ED7", "\u1ED9", "\u01A1", "\u1EDD",
|
||||
"\u1EDB", "\u1EDF", "\u1EE1", "\u1EE3")
|
||||
"\u00F2", "\u00F3", "\u1ECF", "\u00F5", "\u1ECD", "\u00F4", "\u1ED3",
|
||||
"\u1ED1", "\u1ED5", "\u1ED7", "\u1ED9", "\u01A1", "\u1EDD", "\u1EDB",
|
||||
"\u1EDF", "\u1EE1", "\u1EE3")
|
||||
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
|
||||
// U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
|
||||
// U+1EA3: "ả" LATIN SMALL LETTER A WITH HOOK ABOVE
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.util.Locale;
|
|||
@SmallTest
|
||||
public final class TestsZulu extends TestsEnglishUS {
|
||||
private static final Locale LOCALE = new Locale("zu");
|
||||
private static final LayoutBase LAYOUT = new Qwerty(new EnglishUSCustomizer(LOCALE));
|
||||
private static final LayoutBase LAYOUT = new Qwerty(new EnglishCustomizer(LOCALE));
|
||||
|
||||
@Override
|
||||
LayoutBase getLayout() { return LAYOUT; }
|
||||
|
|
Loading…
Reference in New Issue