Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32a7e079 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Add PunctuationSuggestions class"

parents 42e4ea7d a273319c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,5 +21,6 @@
    <!-- The all letters need to be mirrored are found at
         http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt -->
    <!-- Symbols that are suggested between words -->
    <!-- TODO: Use !text resources to merge LTR and RTL punctuations. -->
    <string name="suggested_punctuations" translatable="false">!,?,\\,,:,;,\",(|),)|(,\',-,/,@,_</string>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -21,5 +21,6 @@
    <!-- The all letters need to be mirrored are found at
         http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt -->
    <!-- Symbols that are suggested between words -->
    <!-- TODO: Use !text resources to merge LTR and RTL punctuations. -->
    <string name="suggested_punctuations" translatable="false">!,?,\\,,:,;,\",(|),)|(,\',-,/,@,_</string>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -21,5 +21,6 @@
    <!-- The all letters need to be mirrored are found at
         http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt -->
    <!-- Symbols that are suggested between words -->
    <!-- TODO: Use !text resources to merge LTR and RTL punctuations. -->
    <string name="suggested_punctuations" translatable="false">!,?,\\,,:,;,\",(|),)|(,\',-,/,@,_</string>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@
    <!-- TODO: these settings depend on the language. They should be put either in the dictionary
         header, or in the subtype maybe? -->
    <!-- Symbols that are suggested between words -->
    <!-- TODO: Use !text resources to merge LTR and RTL punctuations. -->
    <!-- TODO: We should have different punctuations list for tablet. -->
    <string name="suggested_punctuations" translatable="false">!,?,\\,,:,;,\",(,),\',-,/,@,_</string>
    <!-- Symbols that are normally preceded by a space (used to add an auto-space before these) -->
    <string name="symbols_preceded_by_space" translatable="false">([{&amp;</string>
+1 −2
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import android.text.Spanned;
import android.text.TextUtils;
import android.text.style.SuggestionSpan;

import com.android.inputmethod.latin.Dictionary;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
@@ -70,7 +69,7 @@ public final class SuggestionSpanUtils {
    public static CharSequence getTextWithSuggestionSpan(final Context context,
            final String pickedWord, final SuggestedWords suggestedWords) {
        if (TextUtils.isEmpty(pickedWord) || suggestedWords.isEmpty()
                || suggestedWords.mIsPrediction || suggestedWords.mIsPunctuationSuggestions) {
                || suggestedWords.mIsPrediction || suggestedWords.isPunctuationSuggestions()) {
            return pickedWord;
        }

Loading