Hello,
I have an issue with displaying sof keyboard on android devices.
I use CCTextFieldTTF to set user name (on player death event in my game) I do this as simple as it can be:
pNicknameDelegate = new CCTextFieldDelegate();
CCTextFieldTTF* pNickname = CCTextFieldTTF::textFieldWithPlaceHolder("Enter Player Nickname", (pConfig->getResourceName(RES_FONT_FOLKSOLID))->toStdString().c_str(), 20.0f);
CCSize s = CCDirector::sharedDirector()->getWinSize();
pNickname->setPosition(ccp(pResultsTable->getContentSize().width*0.15f, pResultsTable->getContentSize().height*0.69+1.0f*mScale));
pNickname->setAnchorPoint(ccp(0.0, 0.5));
pNickname->setIsVisible(false);
//pNickname->setDelegate(pNicknameDelegate);
pResultsTable->addChild(pNickname);
then in some place in code i simply call:
pNickname->attachWithIME();
and now:
- on iOS devices (iPhone, iPad) soft keyboard became visible and I can type user name;
- on Android devices soft keyboard not became visible and I can’t type user name.
Why my keyboard is not showing when I call attachWithIME() on Android devices ? Can you help me in that issue ? Am I doing something wrong ?