Cleanup private method names
This is a follow up of Ib0ded6f98a. Change-Id: I91ad3504d301113680194ad5b10913fc86006150
This commit is contained in:
parent
e6b992d9be
commit
8542c48c30
1 changed files with 12 additions and 15 deletions
|
@ -123,8 +123,9 @@ public class LayoutBase {
|
||||||
|
|
||||||
// Helper method to create alphabet layout for phone by adding special function keys except
|
// Helper method to create alphabet layout for phone by adding special function keys except
|
||||||
// shift key.
|
// shift key.
|
||||||
private static ExpectedKeyboardBuilder toPhoneAlphabet(final ExpectedKeyboardBuilder builder) {
|
private static ExpectedKeyboardBuilder convertToPhoneAlphabetKeyboardBuilder(
|
||||||
return builder
|
final ExpectedKey[][] commonLayout) {
|
||||||
|
return new ExpectedKeyboardBuilder(commonLayout)
|
||||||
.addKeysOnTheRightOfRow(3, DELETE_KEY)
|
.addKeysOnTheRightOfRow(3, DELETE_KEY)
|
||||||
.setLabelsOfRow(4, ",", " ", ".")
|
.setLabelsOfRow(4, ",", " ", ".")
|
||||||
.setMoreKeysOf(",", SETTINGS_KEY)
|
.setMoreKeysOf(",", SETTINGS_KEY)
|
||||||
|
@ -135,8 +136,9 @@ public class LayoutBase {
|
||||||
|
|
||||||
// Helper method to create alphabet layout for tablet by adding special function keys except
|
// Helper method to create alphabet layout for tablet by adding special function keys except
|
||||||
// shift key.
|
// shift key.
|
||||||
private static ExpectedKeyboardBuilder toTabletAlphabet(final ExpectedKeyboardBuilder builder) {
|
private static ExpectedKeyboardBuilder convertToTabletAlphabetKeyboardBuilder(
|
||||||
return builder
|
final ExpectedKey[][] commonLayout) {
|
||||||
|
return new ExpectedKeyboardBuilder(commonLayout)
|
||||||
// U+00BF: "¿" INVERTED QUESTION MARK
|
// U+00BF: "¿" INVERTED QUESTION MARK
|
||||||
// U+00A1: "¡" INVERTED EXCLAMATION MARK
|
// U+00A1: "¡" INVERTED EXCLAMATION MARK
|
||||||
.addKeysOnTheRightOfRow(3,
|
.addKeysOnTheRightOfRow(3,
|
||||||
|
@ -150,22 +152,17 @@ public class LayoutBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper method to create alphabet layout by adding special function keys.
|
// Helper method to create alphabet layout by adding special function keys.
|
||||||
public static ExpectedKey[][] getAlphabetLayoutWithoutShiftKeys(final ExpectedKey[][] common,
|
public static ExpectedKey[][] getAlphabetLayoutWithoutShiftKeys(
|
||||||
final boolean isPhone) {
|
final ExpectedKey[][] commonLayout, final boolean isPhone) {
|
||||||
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(common);
|
return isPhone ? convertToPhoneAlphabetKeyboardBuilder(commonLayout).build()
|
||||||
if (isPhone) {
|
: convertToTabletAlphabetKeyboardBuilder(commonLayout).build();
|
||||||
toPhoneAlphabet(builder);
|
|
||||||
} else {
|
|
||||||
toTabletAlphabet(builder).build();
|
|
||||||
}
|
|
||||||
return builder.build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper method to create alphabet layout by adding special function keys.
|
// Helper method to create alphabet layout by adding special function keys.
|
||||||
public static ExpectedKey[][] getDefaultAlphabetLayout(final ExpectedKey[][] common,
|
public static ExpectedKey[][] getDefaultAlphabetLayout(final ExpectedKey[][] commonLayout,
|
||||||
final boolean isPhone) {
|
final boolean isPhone) {
|
||||||
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(
|
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(
|
||||||
getAlphabetLayoutWithoutShiftKeys(common, isPhone));
|
getAlphabetLayoutWithoutShiftKeys(commonLayout, isPhone));
|
||||||
if (isPhone) {
|
if (isPhone) {
|
||||||
builder.addKeysOnTheLeftOfRow(3, key(SHIFT_KEY, CAPSLOCK_MORE_KEY));
|
builder.addKeysOnTheLeftOfRow(3, key(SHIFT_KEY, CAPSLOCK_MORE_KEY));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue