Loading core/java/android/widget/Editor.java +6 −7 Original line number Diff line number Diff line Loading @@ -2645,6 +2645,8 @@ public class Editor { private SuggestionAdapter mSuggestionsAdapter; private final Comparator<SuggestionSpan> mSuggestionSpanComparator; private final HashMap<SuggestionSpan, Integer> mSpansLengths; private final TextAppearanceSpan mHighlightSpan = new TextAppearanceSpan( mTextView.getContext(), android.R.style.TextAppearance_SuggestionHighlight); private class CustomPopupWindow extends PopupWindow { public CustomPopupWindow(Context context, int defStyleAttr) { Loading Loading @@ -2710,8 +2712,6 @@ public class Editor { SuggestionSpan suggestionSpan; // the SuggestionSpan that this TextView represents int suggestionIndex; // the index of this suggestion inside suggestionSpan SpannableStringBuilder text = new SpannableStringBuilder(); TextAppearanceSpan highlightSpan = new TextAppearanceSpan(mTextView.getContext(), android.R.style.TextAppearance_SuggestionHighlight); } private class SuggestionAdapter extends BaseAdapter { Loading Loading @@ -2948,7 +2948,7 @@ public class Editor { suggestionInfo.suggestionIndex = ADD_TO_DICTIONARY; suggestionInfo.text.replace(0, suggestionInfo.text.length(), mTextView. getContext().getString(com.android.internal.R.string.addToDictionary)); suggestionInfo.text.setSpan(suggestionInfo.highlightSpan, 0, 0, suggestionInfo.text.setSpan(mHighlightSpan, 0, 0, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); mNumberOfSuggestions++; Loading @@ -2961,8 +2961,7 @@ public class Editor { suggestionInfo.suggestionIndex = DELETE_TEXT; suggestionInfo.text.replace(0, suggestionInfo.text.length(), mTextView.getContext().getString(com.android.internal.R.string.deleteText)); suggestionInfo.text.setSpan(suggestionInfo.highlightSpan, 0, 0, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); suggestionInfo.text.setSpan(mHighlightSpan, 0, 0, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); mNumberOfSuggestions++; if (mSuggestionRangeSpan == null) mSuggestionRangeSpan = new SuggestionRangeSpan(); Loading Loading @@ -2993,8 +2992,8 @@ public class Editor { suggestionInfo.suggestionEnd = suggestionInfo.suggestionStart + suggestionInfo.text.length(); suggestionInfo.text.setSpan(suggestionInfo.highlightSpan, 0, suggestionInfo.text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); suggestionInfo.text.setSpan(mHighlightSpan, 0, suggestionInfo.text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); // Add the text before and after the span. final String textAsString = text.toString(); Loading Loading
core/java/android/widget/Editor.java +6 −7 Original line number Diff line number Diff line Loading @@ -2645,6 +2645,8 @@ public class Editor { private SuggestionAdapter mSuggestionsAdapter; private final Comparator<SuggestionSpan> mSuggestionSpanComparator; private final HashMap<SuggestionSpan, Integer> mSpansLengths; private final TextAppearanceSpan mHighlightSpan = new TextAppearanceSpan( mTextView.getContext(), android.R.style.TextAppearance_SuggestionHighlight); private class CustomPopupWindow extends PopupWindow { public CustomPopupWindow(Context context, int defStyleAttr) { Loading Loading @@ -2710,8 +2712,6 @@ public class Editor { SuggestionSpan suggestionSpan; // the SuggestionSpan that this TextView represents int suggestionIndex; // the index of this suggestion inside suggestionSpan SpannableStringBuilder text = new SpannableStringBuilder(); TextAppearanceSpan highlightSpan = new TextAppearanceSpan(mTextView.getContext(), android.R.style.TextAppearance_SuggestionHighlight); } private class SuggestionAdapter extends BaseAdapter { Loading Loading @@ -2948,7 +2948,7 @@ public class Editor { suggestionInfo.suggestionIndex = ADD_TO_DICTIONARY; suggestionInfo.text.replace(0, suggestionInfo.text.length(), mTextView. getContext().getString(com.android.internal.R.string.addToDictionary)); suggestionInfo.text.setSpan(suggestionInfo.highlightSpan, 0, 0, suggestionInfo.text.setSpan(mHighlightSpan, 0, 0, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); mNumberOfSuggestions++; Loading @@ -2961,8 +2961,7 @@ public class Editor { suggestionInfo.suggestionIndex = DELETE_TEXT; suggestionInfo.text.replace(0, suggestionInfo.text.length(), mTextView.getContext().getString(com.android.internal.R.string.deleteText)); suggestionInfo.text.setSpan(suggestionInfo.highlightSpan, 0, 0, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); suggestionInfo.text.setSpan(mHighlightSpan, 0, 0, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); mNumberOfSuggestions++; if (mSuggestionRangeSpan == null) mSuggestionRangeSpan = new SuggestionRangeSpan(); Loading Loading @@ -2993,8 +2992,8 @@ public class Editor { suggestionInfo.suggestionEnd = suggestionInfo.suggestionStart + suggestionInfo.text.length(); suggestionInfo.text.setSpan(suggestionInfo.highlightSpan, 0, suggestionInfo.text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); suggestionInfo.text.setSpan(mHighlightSpan, 0, suggestionInfo.text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); // Add the text before and after the span. final String textAsString = text.toString(); Loading