diff options
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/CandidateView.java | 9 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java index 7ec18b38a..565b01d5a 100644 --- a/java/src/com/android/inputmethod/latin/CandidateView.java +++ b/java/src/com/android/inputmethod/latin/CandidateView.java @@ -333,7 +333,9 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo final TypedArray keyboardViewAttr = context.obtainStyledAttributes( attrs, R.styleable.KeyboardView, R.attr.keyboardViewStyle, R.style.KeyboardView); - final Drawable keyBackground = keyboardViewAttr.getDrawable( + final Drawable expandBackground = keyboardViewAttr.getDrawable( + R.styleable.KeyboardView_keyBackground); + final Drawable closeBackground = keyboardViewAttr.getDrawable( R.styleable.KeyboardView_keyBackground); final int keyTextColor = keyboardViewAttr.getColor( R.styleable.KeyboardView_keyTextColor, 0xFF000000); @@ -341,7 +343,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo mCandidatesPaneControl = (ViewGroup)findViewById(R.id.candidates_pane_control); mExpandCandidatesPane = (TextView)findViewById(R.id.expand_candidates_pane); - mExpandCandidatesPane.setBackgroundDrawable(keyBackground); + mExpandCandidatesPane.setBackgroundDrawable(expandBackground); mExpandCandidatesPane.setTextColor(keyTextColor); mExpandCandidatesPane.setOnClickListener(new OnClickListener() { @Override @@ -350,7 +352,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo } }); mCloseCandidatesPane = (TextView)findViewById(R.id.close_candidates_pane); - mCloseCandidatesPane.setBackgroundDrawable(keyBackground); + mCloseCandidatesPane.setBackgroundDrawable(closeBackground); mCloseCandidatesPane.setTextColor(keyTextColor); mCloseCandidatesPane.setOnClickListener(new OnClickListener() { @Override @@ -704,6 +706,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo mCandidatesStrip.setVisibility(VISIBLE); mCandidatesStrip.removeAllViews(); mCandidatesPane.removeAllViews(); + closeCandidatesPane(); } private void hidePreview() { diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index e4eb0e7bf..12dad534f 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -580,6 +580,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar switcher.updateShiftState(); } + if (mCandidateView != null) + mCandidateView.clear(); setSuggestionStripShownInternal(isCandidateStripVisible(), /* needsInputViewShown */ false); // Delay updating suggestions because keyboard input view may not be shown at this point. mHandler.postUpdateSuggestions(); |