Use the unique flag in SuggestionsView
Also, the first word in a sugestions list can never be obsolete. Change-Id: Ib21439aac8db4e6ce5b15b7a2aabe4222bc354dbmain
parent
03a3517075
commit
4f6cf258fe
|
@ -93,7 +93,6 @@ public class SuggestionSpanUtils {
|
|||
CharSequence pickedWord, SuggestedWords suggestedWords) {
|
||||
if (TextUtils.isEmpty(pickedWord) || CONSTRUCTOR_SuggestionSpan == null
|
||||
|| suggestedWords == null || suggestedWords.size() == 0
|
||||
|| suggestedWords.getInfo(0).isObsoleteSuggestedWord()
|
||||
|| OBJ_SUGGESTIONS_MAX_SIZE == null) {
|
||||
return pickedWord;
|
||||
}
|
||||
|
|
|
@ -341,7 +341,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
|
|||
|
||||
final SuggestedWordInfo info = (pos < suggestedWords.size())
|
||||
? suggestedWords.getInfo(pos) : null;
|
||||
if (info != null && info.isObsoleteSuggestedWord()) {
|
||||
if (suggestedWords.mIsObsoleteSuggestions && isSuggested) {
|
||||
return applyAlpha(color, mAlphaObsoleted);
|
||||
} else {
|
||||
return color;
|
||||
|
|
Loading…
Reference in New Issue