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

Commit e670101d authored by Gilles Debunne's avatar Gilles Debunne
Browse files

Bug 5384675: Color in add to dictionary

Change-Id: Ibb89265a90d6b598927dec2bcf45a8c02388b5f0
parent 1c6ac4eb
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -9900,6 +9900,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                    suggestionInfo.suggestionIndex = ADD_TO_DICTIONARY;
                    suggestionInfo.text.replace(0, suggestionInfo.text.length(),
                            getContext().getString(com.android.internal.R.string.addToDictionary));
                    suggestionInfo.text.setSpan(suggestionInfo.highlightSpan, 0, 0,
                            Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

                    mNumberOfSuggestions++;
                }
@@ -9911,6 +9913,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            suggestionInfo.suggestionIndex = DELETE_TEXT;
            suggestionInfo.text.replace(0, suggestionInfo.text.length(),
                    getContext().getString(com.android.internal.R.string.deleteText));
            suggestionInfo.text.setSpan(suggestionInfo.highlightSpan, 0, 0,
                    Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
            mNumberOfSuggestions++;

            if (mSuggestionRangeSpan == null) mSuggestionRangeSpan = new SuggestionRangeSpan();
@@ -9940,7 +9944,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            suggestionInfo.suggestionEnd = suggestionInfo.suggestionStart 
                    + suggestionInfo.text.length();

            suggestionInfo.text.clearSpans();
            suggestionInfo.text.setSpan(suggestionInfo.highlightSpan, 0,
                    suggestionInfo.text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);