Use the unique flag in SuggestionsView

Also, the first word in a sugestions list can never be
obsolete.

Change-Id: Ib21439aac8db4e6ce5b15b7a2aabe4222bc354db
main
Jean Chalard 2012-03-15 14:08:04 +09:00
parent 03a3517075
commit 4f6cf258fe
2 changed files with 1 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;