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
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 346af3a..d625951 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -482,12 +482,16 @@
 
     @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