I want to change the EditBox settings a bit.I was able to change the settings of EditBox on iOS. But I didn’t know about Android EditBox.Please let me know because I want to change the settings in the code below on Android as well.
// UIEditBox.cpp
void EditBox::keyboardWillShow(IMEKeyboardNotificationInfo& info)
{
// CCLOG(“CCEditBox::keyboardWillShow”);
Rect rectTracked = getRect(this);
// some adjustment for margin between the keyboard and the edit box.
rectTracked.origin.y -= 4;
// if the keyboard area doesn't intersect with the tracking node area, nothing needs to be done.
if (!rectTracked.intersectsRect(info.end))
{
CCLOG("needn't to adjust view layout.");
return;
}
// assume keyboard at the bottom of screen, calculate the vertical adjustment.
_adjustHeight = info.end.getMaxY() - rectTracked.getMinY();
// CCLOG("CCEditBox:needAdjustVerticalPosition(%f)", _adjustHeight);
if (_editBoxImpl != nullptr)
{
_editBoxImpl->doAnimationWhenKeyboardMove(info.duration, _adjustHeight);
}
}
// this
1: rectTracked.origin.y -= 4;
2: _adjustHeight = info.end.getMaxY() - rectTracked.getMinY();
3: _editBoxImpl->doAnimationWhenKeyboardMove(info.duration, _adjustHeight);