Added missing special character: |
This commit is contained in:
parent
9337a175a7
commit
2d8ca63f0f
7 changed files with 24 additions and 21 deletions
|
|
@ -15,7 +15,7 @@ import io.github.sspanak.tt9.ime.EmptyDatabaseWarning;
|
||||||
import io.github.sspanak.tt9.ime.helpers.InputFieldHelper;
|
import io.github.sspanak.tt9.ime.helpers.InputFieldHelper;
|
||||||
import io.github.sspanak.tt9.languages.InvalidLanguageCharactersException;
|
import io.github.sspanak.tt9.languages.InvalidLanguageCharactersException;
|
||||||
import io.github.sspanak.tt9.languages.Language;
|
import io.github.sspanak.tt9.languages.Language;
|
||||||
import io.github.sspanak.tt9.languages.Punctuation;
|
import io.github.sspanak.tt9.languages.Characters;
|
||||||
import io.github.sspanak.tt9.preferences.SettingsStore;
|
import io.github.sspanak.tt9.preferences.SettingsStore;
|
||||||
|
|
||||||
public class ModePredictive extends InputMode {
|
public class ModePredictive extends InputMode {
|
||||||
|
|
@ -56,7 +56,7 @@ public class ModePredictive extends InputMode {
|
||||||
// digitSequence limiter when selecting emoji
|
// digitSequence limiter when selecting emoji
|
||||||
// "11" = Emoji level 0, "111" = Emoji level 1,... up to the maximum amount of 1s
|
// "11" = Emoji level 0, "111" = Emoji level 1,... up to the maximum amount of 1s
|
||||||
StringBuilder maxEmojiSequenceBuilder = new StringBuilder();
|
StringBuilder maxEmojiSequenceBuilder = new StringBuilder();
|
||||||
for (int i = 0; i <= Punctuation.getEmojiLevels(); i++) {
|
for (int i = 0; i <= Characters.getEmojiLevels(); i++) {
|
||||||
maxEmojiSequenceBuilder.append("1");
|
maxEmojiSequenceBuilder.append("1");
|
||||||
}
|
}
|
||||||
maxEmojiSequence = maxEmojiSequenceBuilder.toString();
|
maxEmojiSequence = maxEmojiSequenceBuilder.toString();
|
||||||
|
|
@ -213,7 +213,7 @@ public class ModePredictive extends InputMode {
|
||||||
suggestions = language.getKeyCharacters(1, false);
|
suggestions = language.getKeyCharacters(1, false);
|
||||||
} else {
|
} else {
|
||||||
digitSequence = digitSequence.length() <= maxEmojiSequence.length() ? digitSequence : maxEmojiSequence;
|
digitSequence = digitSequence.length() <= maxEmojiSequence.length() ? digitSequence : maxEmojiSequence;
|
||||||
suggestions = Punctuation.getEmoji(digitSequence.length() - 2);
|
suggestions = Characters.getEmoji(digitSequence.length() - 2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@ import android.os.Build;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class Punctuation {
|
public class Characters {
|
||||||
final public static ArrayList<String> Main = new ArrayList<>(Arrays.asList(
|
final public static ArrayList<String> Sentence = new ArrayList<>(Arrays.asList(
|
||||||
",", ".", "-", "(", ")", "[", "]", "&", "~", "`", "'", ";", ":", "\"", "!", "?"
|
",", ".", "-", "(", ")", "[", "]", "&", "~", "`", "'", ";", ":", "\"", "!", "?"
|
||||||
));
|
));
|
||||||
|
|
||||||
final public static ArrayList<String> Secondary = new ArrayList<>(Arrays.asList(
|
final public static ArrayList<String> Special = new ArrayList<>(Arrays.asList(
|
||||||
" ", "\n", "@", "_", "#", "%", "$", "{", "}", "^", "<", ">", "\\", "/", "=", "*", "+"
|
" ", "\n", "@", "_", "#", "%", "$", "{", "}", "|", "^", "<", ">", "\\", "/", "=", "*", "+"
|
||||||
));
|
));
|
||||||
|
|
||||||
final private static ArrayList<String> TextEmoticons = new ArrayList<>(Arrays.asList(
|
final private static ArrayList<String> TextEmoticons = new ArrayList<>(Arrays.asList(
|
||||||
|
|
@ -20,12 +20,15 @@ public class Punctuation {
|
||||||
));
|
));
|
||||||
|
|
||||||
final private static ArrayList<ArrayList<String>> Emoji = new ArrayList<>(Arrays.asList(
|
final private static ArrayList<ArrayList<String>> Emoji = new ArrayList<>(Arrays.asList(
|
||||||
|
// smile -> frown
|
||||||
new ArrayList<>(Arrays.asList(
|
new ArrayList<>(Arrays.asList(
|
||||||
"🙂", "😀", "🤣", "😉", "😛", "😳", "😲", "😱", "😭", "😢", "🙁"
|
"🙂", "😀", "🤣", "😉", "😛", "😳", "😲", "😱", "😭", "😢", "🙁"
|
||||||
)),
|
)),
|
||||||
|
// hands
|
||||||
new ArrayList<>(Arrays.asList(
|
new ArrayList<>(Arrays.asList(
|
||||||
"👍", "👋", "✌️", "👏", "🤝", "💪", "🤘", "🖖", "👎"
|
"👍", "👋", "✌️", "👏", "🤝", "💪", "🤘", "🖖", "👎"
|
||||||
)),
|
)),
|
||||||
|
// emotions
|
||||||
new ArrayList<>(Arrays.asList(
|
new ArrayList<>(Arrays.asList(
|
||||||
"❤", "🤗", "😍", "😘", "😇", "😈", "🎉", "🤓", "😎", "🤔", "🥶", "😬"
|
"❤", "🤗", "😍", "😘", "😇", "😈", "🎉", "🤓", "😎", "🤔", "🥶", "😬"
|
||||||
))
|
))
|
||||||
|
|
@ -6,7 +6,7 @@ import java.util.Locale;
|
||||||
|
|
||||||
import io.github.sspanak.tt9.R;
|
import io.github.sspanak.tt9.R;
|
||||||
import io.github.sspanak.tt9.languages.Language;
|
import io.github.sspanak.tt9.languages.Language;
|
||||||
import io.github.sspanak.tt9.languages.Punctuation;
|
import io.github.sspanak.tt9.languages.Characters;
|
||||||
|
|
||||||
public class Bulgarian extends Language {
|
public class Bulgarian extends Language {
|
||||||
public Bulgarian() {
|
public Bulgarian() {
|
||||||
|
|
@ -21,8 +21,8 @@ public class Bulgarian extends Language {
|
||||||
isPunctuationPartOfWords = false;
|
isPunctuationPartOfWords = false;
|
||||||
|
|
||||||
characterMap = new ArrayList<>(Arrays.asList(
|
characterMap = new ArrayList<>(Arrays.asList(
|
||||||
Punctuation.Secondary, // 0
|
Characters.Special, // 0
|
||||||
Punctuation.Main, // 1
|
Characters.Sentence, // 1
|
||||||
new ArrayList<>(Arrays.asList("а", "б", "в", "г")), // 2
|
new ArrayList<>(Arrays.asList("а", "б", "в", "г")), // 2
|
||||||
new ArrayList<>(Arrays.asList("д", "е", "ж", "з")), // 3
|
new ArrayList<>(Arrays.asList("д", "е", "ж", "з")), // 3
|
||||||
new ArrayList<>(Arrays.asList("и", "й", "к", "л", "ѝ")), // 4
|
new ArrayList<>(Arrays.asList("и", "й", "к", "л", "ѝ")), // 4
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import java.util.Locale;
|
||||||
|
|
||||||
import io.github.sspanak.tt9.R;
|
import io.github.sspanak.tt9.R;
|
||||||
import io.github.sspanak.tt9.languages.Language;
|
import io.github.sspanak.tt9.languages.Language;
|
||||||
import io.github.sspanak.tt9.languages.Punctuation;
|
import io.github.sspanak.tt9.languages.Characters;
|
||||||
|
|
||||||
public class English extends Language {
|
public class English extends Language {
|
||||||
public English() {
|
public English() {
|
||||||
|
|
@ -21,8 +21,8 @@ public class English extends Language {
|
||||||
isPunctuationPartOfWords = true;
|
isPunctuationPartOfWords = true;
|
||||||
|
|
||||||
characterMap = new ArrayList<>(Arrays.asList(
|
characterMap = new ArrayList<>(Arrays.asList(
|
||||||
Punctuation.Secondary, // 0
|
Characters.Special, // 0
|
||||||
Punctuation.Main, // 1
|
Characters.Sentence, // 1
|
||||||
new ArrayList<>(Arrays.asList("a", "b", "c")), // 2
|
new ArrayList<>(Arrays.asList("a", "b", "c")), // 2
|
||||||
new ArrayList<>(Arrays.asList("d", "e", "f")), // 3
|
new ArrayList<>(Arrays.asList("d", "e", "f")), // 3
|
||||||
new ArrayList<>(Arrays.asList("g", "h", "i")), // 4
|
new ArrayList<>(Arrays.asList("g", "h", "i")), // 4
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import java.util.Locale;
|
||||||
|
|
||||||
import io.github.sspanak.tt9.R;
|
import io.github.sspanak.tt9.R;
|
||||||
import io.github.sspanak.tt9.languages.Language;
|
import io.github.sspanak.tt9.languages.Language;
|
||||||
import io.github.sspanak.tt9.languages.Punctuation;
|
import io.github.sspanak.tt9.languages.Characters;
|
||||||
|
|
||||||
public class Russian extends Language {
|
public class Russian extends Language {
|
||||||
public Russian() {
|
public Russian() {
|
||||||
|
|
@ -21,8 +21,8 @@ public class Russian extends Language {
|
||||||
isPunctuationPartOfWords = false;
|
isPunctuationPartOfWords = false;
|
||||||
|
|
||||||
characterMap = new ArrayList<>(Arrays.asList(
|
characterMap = new ArrayList<>(Arrays.asList(
|
||||||
Punctuation.Secondary, // 0
|
Characters.Special, // 0
|
||||||
Punctuation.Main, // 1
|
Characters.Sentence, // 1
|
||||||
new ArrayList<>(Arrays.asList("а", "б", "в", "г")), // 2
|
new ArrayList<>(Arrays.asList("а", "б", "в", "г")), // 2
|
||||||
new ArrayList<>(Arrays.asList("д", "е", "ё", "ж", "з")), // 3
|
new ArrayList<>(Arrays.asList("д", "е", "ё", "ж", "з")), // 3
|
||||||
new ArrayList<>(Arrays.asList("и", "й", "к", "л")), // 4
|
new ArrayList<>(Arrays.asList("и", "й", "к", "л")), // 4
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import java.util.Collections;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import io.github.sspanak.tt9.R;
|
import io.github.sspanak.tt9.R;
|
||||||
import io.github.sspanak.tt9.languages.Punctuation;
|
import io.github.sspanak.tt9.languages.Characters;
|
||||||
|
|
||||||
public class Spanish extends English {
|
public class Spanish extends English {
|
||||||
public Spanish() {
|
public Spanish() {
|
||||||
|
|
@ -20,7 +20,7 @@ public class Spanish extends English {
|
||||||
|
|
||||||
isPunctuationPartOfWords = false;
|
isPunctuationPartOfWords = false;
|
||||||
|
|
||||||
characterMap.set(1, new ArrayList<>(Punctuation.Main));
|
characterMap.set(1, new ArrayList<>(Characters.Sentence));
|
||||||
characterMap.get(1).addAll(Arrays.asList("¡", "¿"));
|
characterMap.get(1).addAll(Arrays.asList("¡", "¿"));
|
||||||
|
|
||||||
characterMap.get(2).addAll(Collections.singletonList("á"));
|
characterMap.get(2).addAll(Collections.singletonList("á"));
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import java.util.Locale;
|
||||||
|
|
||||||
import io.github.sspanak.tt9.R;
|
import io.github.sspanak.tt9.R;
|
||||||
import io.github.sspanak.tt9.languages.Language;
|
import io.github.sspanak.tt9.languages.Language;
|
||||||
import io.github.sspanak.tt9.languages.Punctuation;
|
import io.github.sspanak.tt9.languages.Characters;
|
||||||
|
|
||||||
public class Ukrainian extends Language {
|
public class Ukrainian extends Language {
|
||||||
public Ukrainian() {
|
public Ukrainian() {
|
||||||
|
|
@ -21,8 +21,8 @@ public class Ukrainian extends Language {
|
||||||
isPunctuationPartOfWords = true;
|
isPunctuationPartOfWords = true;
|
||||||
|
|
||||||
characterMap = new ArrayList<>(Arrays.asList(
|
characterMap = new ArrayList<>(Arrays.asList(
|
||||||
Punctuation.Secondary, // 0
|
Characters.Special, // 0
|
||||||
Punctuation.Main, // 1
|
Characters.Sentence, // 1
|
||||||
new ArrayList<>(Arrays.asList("а", "б", "в", "г", "ґ")), // 2
|
new ArrayList<>(Arrays.asList("а", "б", "в", "г", "ґ")), // 2
|
||||||
new ArrayList<>(Arrays.asList("д", "е", "є", "ж", "з")), // 3
|
new ArrayList<>(Arrays.asList("д", "е", "є", "ж", "з")), // 3
|
||||||
new ArrayList<>(Arrays.asList("и", "і", "ї", "й", "к", "л")), // 4
|
new ArrayList<>(Arrays.asList("и", "і", "ї", "й", "к", "л")), // 4
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue