diff options
author | 2010-09-02 23:27:49 -0700 | |
---|---|---|
committer | 2010-09-02 23:27:49 -0700 | |
commit | 6654653562d0ec5d46a74f8c49eab2488e273cf2 (patch) | |
tree | c2386736b24cd00fdda9f333880f03fe20a546bd /java/src/com/android/inputmethod/latin/CandidateView.java | |
parent | 22776af828c69db22d90b42d196f487095905c70 (diff) | |
parent | c5841994affbca41a7070a769f4f8e51bee4773b (diff) | |
download | latinime-6654653562d0ec5d46a74f8c49eab2488e273cf2.tar.gz latinime-6654653562d0ec5d46a74f8c49eab2488e273cf2.tar.xz latinime-6654653562d0ec5d46a74f8c49eab2488e273cf2.zip |
am c5841994: Merge "Change symbol on space bar when autocompletion is activated" into gingerbread
Merge commit 'c5841994affbca41a7070a769f4f8e51bee4773b' into gingerbread-plus-aosp
* commit 'c5841994affbca41a7070a769f4f8e51bee4773b':
Change symbol on space bar when autocompletion is activated
Diffstat (limited to 'java/src/com/android/inputmethod/latin/CandidateView.java')
-rwxr-xr-x | java/src/com/android/inputmethod/latin/CandidateView.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java index 4995727da..bd73c6fb8 100755 --- a/java/src/com/android/inputmethod/latin/CandidateView.java +++ b/java/src/com/android/inputmethod/latin/CandidateView.java @@ -237,6 +237,8 @@ public class CandidateView extends View { final boolean typedWordValid = mTypedWordValid; final int y = (int) (height + mPaint.getTextSize() - mDescent) / 2; + boolean existsAutoCompletion = false; + for (int i = 0; i < count; i++) { CharSequence suggestion = mSuggestions.get(i); if (suggestion == null) continue; @@ -245,6 +247,7 @@ public class CandidateView extends View { && ((i == 1 && !typedWordValid) || (i == 0 && typedWordValid))) { paint.setTypeface(Typeface.DEFAULT_BOLD); paint.setColor(mColorRecommended); + existsAutoCompletion = true; } else if (i != 0) { paint.setColor(mColorOther); } @@ -285,6 +288,7 @@ public class CandidateView extends View { paint.setTypeface(Typeface.DEFAULT); x += wordWidth; } + mService.onAutoCompletionStateChanged(existsAutoCompletion); mTotalWidth = x; if (mTargetScrollX != scrollX) { scrollToTarget(); |