CCTextFieldTTF text input on Android

CCTextFieldTTF text input on Android
0.0 0


The current CCTextFieldTTF has some issues on Android :
* Android keyboard can vary widely between devices. But the keyboard details such as position, width, height are hard to obtain.
* Hard to support multiple styles of character entry (for exampe voice recognition) if implemented by directly calling InputMethodManager

My suggestion is to replace this with a text entry Dialog popup. The background of this dialog will be the current Cocos2d-x game.

Pros :
* All native capabilities of Android text input is easily and correctly available
* There is no need to handle various input method specific events and query keyboard position etc.

A Screenshot of this proposal in the current TextInputTest unit test on Android is attached. Please let me know what you think and I can submit a patch.

text_entry_dialog.png (46.8 KB)


Yeap, it is easy to handle by using a text entry Dialog popup.
I don’t if it meets the requirement of game developing.

So I want to let developers to decide it.