mirror of https://github.com/axmolengine/axmol.git
Cocos2dxGLSurfaceView little modify.
This commit is contained in:
parent
9b08f4add6
commit
a73ccaf0e3
|
@ -7,6 +7,7 @@ import android.util.AttributeSet;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
import android.view.ViewGroup.LayoutParams;
|
||||||
import android.view.inputmethod.CompletionInfo;
|
import android.view.inputmethod.CompletionInfo;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
import android.view.inputmethod.ExtractedText;
|
import android.view.inputmethod.ExtractedText;
|
||||||
|
@ -170,12 +171,12 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
|
||||||
if (imm == null) {
|
if (imm == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
imm.showSoftInput(mainView, InputMethodManager.SHOW_IMPLICIT);
|
imm.showSoftInput(mainView, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void closeIMEKeyboard() {
|
public static void closeIMEKeyboard() {
|
||||||
if (null != mainView) {
|
if (null == mainView) {
|
||||||
Log.d("Cocos2dxGLSurfaceView", "closeIMEKeyboard");
|
return;
|
||||||
}
|
}
|
||||||
InputMethodManager imm = (InputMethodManager)mainView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager)mainView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
if (imm == null) {
|
if (imm == null) {
|
||||||
|
|
|
@ -174,8 +174,8 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void closeIMEKeyboard() {
|
public static void closeIMEKeyboard() {
|
||||||
if (null != mainView) {
|
if (null == mainView) {
|
||||||
Log.d("Cocos2dxGLSurfaceView", "closeIMEKeyboard");
|
return;
|
||||||
}
|
}
|
||||||
InputMethodManager imm = (InputMethodManager)mainView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager)mainView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
if (imm == null) {
|
if (imm == null) {
|
||||||
|
|
Loading…
Reference in New Issue