3
\$\begingroup\$

Hi I need to know the height of my keyboard so I can move up some textfield I have in my app. I'm using cocos2D-X but the app don't recognize the keyboardWillShow method.

Thanks

\$\endgroup\$
2
\$\begingroup\$

From my understanding of the virtual keyboard, you can't get the height. What you can do is set your window to re-size mode and handle the re-size.

For more information see this question on SO and this discussion on Google groups.

\$\endgroup\$
  • \$\begingroup\$ Sorry, how can I set my window to re-size ? I found this android:windowSoftInputMode="adjustResize" but it doesn't work \$\endgroup\$ – magorich Nov 30 '12 at 20:27
  • \$\begingroup\$ And in the stack forum I can't get getSingletonInstrumentation() so it doesn't work for me neither \$\endgroup\$ – magorich Nov 30 '12 at 20:28
  • \$\begingroup\$ Sorry, I can't help much beyond what I've given you. I've never written an Android app. What I read says that strategy will work, but I can't give you the specifics of implementing it. \$\endgroup\$ – MichaelHouse Nov 30 '12 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.