diff options
author | 2013-04-09 03:31:15 -0700 | |
---|---|---|
committer | 2013-04-09 03:31:15 -0700 | |
commit | 75618c3321b8eae559886ba5f71e967591da7065 (patch) | |
tree | b1b13d6f5bc29a68fbde715464f10e6265e953d2 /java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java | |
parent | daef4e8f194632a501270ea28c0ae8764a9fe97a (diff) | |
parent | 19dcd154932b8aef07f371bdda7f879a70c3c3c8 (diff) | |
download | latinime-75618c3321b8eae559886ba5f71e967591da7065.tar.gz latinime-75618c3321b8eae559886ba5f71e967591da7065.tar.xz latinime-75618c3321b8eae559886ba5f71e967591da7065.zip |
am 19dcd154: Merge "Offer to add any OOV typed word to the dictionary."
* commit '19dcd154932b8aef07f371bdda7f879a70c3c3c8':
Offer to add any OOV typed word to the dictionary.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java index 8c3d3b08c..eeaf828a7 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java @@ -62,6 +62,7 @@ import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.ResourceUtils; import com.android.inputmethod.latin.SuggestedWords; +import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; import com.android.inputmethod.latin.Utils; import com.android.inputmethod.latin.define.ProductionFlag; import com.android.inputmethod.research.ResearchLogger; @@ -72,7 +73,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick OnLongClickListener { public interface Listener { public void addWordToUserDictionary(String word); - public void pickSuggestionManually(int index, String word); + public void pickSuggestionManually(int index, SuggestedWordInfo word); } // The maximum number of suggestions available. See {@link Suggest#mPrefMaxSuggestions}. @@ -656,8 +657,8 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick @Override public boolean onCustomRequest(final int requestCode) { final int index = requestCode; - final String word = mSuggestedWords.getWord(index); - mListener.pickSuggestionManually(index, word); + final SuggestedWordInfo wordInfo = mSuggestedWords.getInfo(index); + mListener.pickSuggestionManually(index, wordInfo); dismissMoreSuggestions(); return true; } @@ -807,8 +808,8 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick if (index >= mSuggestedWords.size()) return; - final String word = mSuggestedWords.getWord(index); - mListener.pickSuggestionManually(index, word); + final SuggestedWordInfo wordInfo = mSuggestedWords.getInfo(index); + mListener.pickSuggestionManually(index, wordInfo); } @Override |