Trouble with Soft keyboard in cocos2d-x [ Android ]

Hi all !

I’m newbie in cocos2d-x and C++ .
Sorry my English not good .

I have trouble with soft keyboard . I create CCTextFieldTTF like example in TestCpp .
But I test in Android and Win32 , the func void KeyboardNotificationLayer::keyboardWillShow(CCIMEKeyboardNotificationInfo& info) not run when the keyboard show .

When keyboard show my CCTextFieldTTF be invisible behind Keyboard.

I try to find some solution to get Keyboard height but not successfully.

Anyone have idea :frowning:

I want to push up my layout when keyboard show , or I want attach 1 CCTextFieldTTF in default keyboard to view text user inserted .
Or create custom keyboard in cocos2d-x use default keyboard .

Waiting for reply :(.
Thanks for read .

And if someone know about JNI please tell me how to use it .

I need call func Java from C*+ and call func C*+ from Java too .

Thanks !

What is your use case?
It appears that CCEditBox is generally recommended over CCTextFieldTTF (Disclaimer: I haven’t used CCTextFieldTTF at all).
If you need simple input functionality try using CCEditBox. The reason I bring this up is because it wasn’t apparent to me in the docs when I first started

There are some JNI guides on this site: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Scripting_and_Translating_between_Programming_Languages

Justin Godesky wrote:

What is your use case?
It appears that CCEditBox is generally recommended over CCTextFieldTTF (Disclaimer: I haven’t used CCTextFieldTTF at all).
If you need simple input functionality try using CCEditBox. The reason I bring this up is because it wasn’t apparent to me in the docs when I first started
>
There are some JNI guides on this site: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Scripting_and_Translating_between_Programming_Languages

When I find input in cocos2d-x, sometime I see another people talk about CCEditBox too , but I don’t find it in my cocos2d-x :(.

Where I can found CCEditBox :frowning:

It’s in the “extensions” folder.
I don’t know how you organized your project, mine was automatically linked since I used a cocos2d-x template

Justin Godesky wrote:

It’s in the “extensions” folder.
I don’t know how you organized your project, mine was automatically linked since I used a cocos2d-x template

I found CCEditBox in extensions folder .
But I don’t know how call it or import this folder like cocos2d folder :(.

I don’t know how either :confused: My projects are created from the project generator (templates), which automatically does it.
Maybe you could create a new project with that, and copy over your resources and game code? (usually the same suggestion for upgrading)

Do you know if it is linked in iOS?

Can you tell me how to create from project generator please .

I create with " Add new project “, it’s have not anything like add more libs …

What do you mean” linked in iOS " ? my English very bad =.-!