aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/CandidateView.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-09-02 22:54:37 +0900
committersatok <satok@google.com>2010-09-03 15:17:26 +0900
commit41feaaadb758a8b31d3e436063b4b5faed104d4d (patch)
treeb9abd9eec2095196e1b8af585a682066e74950b2 /java/src/com/android/inputmethod/latin/CandidateView.java
parent3491c877dd25df829e5e6541a72f375cc2842ea5 (diff)
downloadlatinime-41feaaadb758a8b31d3e436063b4b5faed104d4d.tar.gz
latinime-41feaaadb758a8b31d3e436063b4b5faed104d4d.tar.xz
latinime-41feaaadb758a8b31d3e436063b4b5faed104d4d.zip
Change symbol on space bar when autocompletion is activated
bug: 2959279 Change-Id: Icc70b7cce0c245ae2451d324debd346f226b8769
Diffstat (limited to 'java/src/com/android/inputmethod/latin/CandidateView.java')
-rwxr-xr-xjava/src/com/android/inputmethod/latin/CandidateView.java4
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();