diff options
author | 2011-05-25 18:28:03 +0900 | |
---|---|---|
committer | 2011-05-25 18:28:03 +0900 | |
commit | 6c4add55f94ff729ef1aa35c4f8df3b086344f8a (patch) | |
tree | 12f8062a3eaa145bfaf2e3efdb408a6d354ee7e6 /java/src | |
parent | f4c9e9d359ea1f3b81020f046b9e88584baff07d (diff) | |
download | latinime-6c4add55f94ff729ef1aa35c4f8df3b086344f8a.tar.gz latinime-6c4add55f94ff729ef1aa35c4f8df3b086344f8a.tar.xz latinime-6c4add55f94ff729ef1aa35c4f8df3b086344f8a.zip |
Initialize CandidateView in setInputView
When keyboard theme has been switched, input view will be replaced
with new theme one and current CandidateView will get stale. The
CandidateView must be reseted in setInputView.
Change-Id: I36fd14280572d2d367cfef549d7705b3b321ba3e
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 346af3a2e..d625951fc 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -482,12 +482,16 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar @Override public View onCreateInputView() { - final View inputView = mKeyboardSwitcher.onCreateInputView(); - mCandidateViewContainer = inputView.findViewById(R.id.candidates_container); - mCandidateView = (CandidateView) inputView.findViewById(R.id.candidates); + return mKeyboardSwitcher.onCreateInputView(); + } + + @Override + public void setInputView(View view) { + super.setInputView(view); + mCandidateViewContainer = view.findViewById(R.id.candidates_container); + mCandidateView = (CandidateView) view.findViewById(R.id.candidates); mCandidateView.setService(this); mCandidateStripHeight = (int)mResources.getDimension(R.dimen.candidate_strip_height); - return inputView; } @Override |