diff --git a/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java b/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java index 514c8d5e9d..5677e5b021 100644 --- a/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java +++ b/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java @@ -105,6 +105,7 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView { Cocos2dxGLSurfaceView.this.mCocos2dxEditText.removeTextChangedListener(Cocos2dxGLSurfaceView.sCocos2dxTextInputWraper); final InputMethodManager imm = (InputMethodManager) Cocos2dxGLSurfaceView.mCocos2dxGLSurfaceView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(Cocos2dxGLSurfaceView.this.mCocos2dxEditText.getWindowToken(), 0); + Cocos2dxGLSurfaceView.this.requestFocus(); Log.d("GLSurfaceView", "HideSoftInput"); } break; diff --git a/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxTextInputWraper.java b/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxTextInputWraper.java index 0f5c7f6d4a..654cf758be 100644 --- a/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxTextInputWraper.java +++ b/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxTextInputWraper.java @@ -28,6 +28,7 @@ import android.text.Editable; import android.text.TextWatcher; import android.util.Log; import android.view.KeyEvent; +import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodManager; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; @@ -150,6 +151,10 @@ public class Cocos2dxTextInputWraper implements TextWatcher, OnEditorActionListe } */ } + + if (pActionID == EditorInfo.IME_ACTION_DONE) { + this.mCocos2dxGLSurfaceView.requestFocus(); + } return false; } diff --git a/extensions/CCBReader/CCBAnimationManager.cpp b/extensions/CCBReader/CCBAnimationManager.cpp index f6d5f9c495..98f47ad62c 100644 --- a/extensions/CCBReader/CCBAnimationManager.cpp +++ b/extensions/CCBReader/CCBAnimationManager.cpp @@ -421,7 +421,7 @@ void CCBAnimationManager::setAnimatedProperty(const char *pPropName, CCNode *pNo else if (strcmp(pPropName, "color") == 0) { ccColor3BWapper *color = (ccColor3BWapper*)pValue; - ((CCSprite*)pNode)->setColor(color->getColor()); + (dynamic_cast(pNode))->setColor(color->getColor()); } else if (strcmp(pPropName, "visible") == 0) {