, __contentTextStyle(TEXT_BOX_TEXT_STYLE_NORMAL)
, __titleFontFaceName("")
, __isSearchBar(false)
- , __isKeypadClosedEventSkipped(false)
, __pCurrentFrame(null)
, __pTextFilter(null)
, __textBlockMoveLeft(false)
__isKeypadShowing = false;
__isKeypadExist = true;
+ SysLog(NID_UI_CTRL, "[EDIT] INPUT_PANEL_SHOW_STATE_SHOW");
+
CheckUSBKeyboardStatus();
if (__isInputConnectionBound)
}
}
- if (__isUSBKeyboardConnected)
- {
- __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
- }
- else
- {
- __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
- __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
- }
-
if (!__pEdit->IsFullScreenKeypadEdit())
{
if (__pParentForm)
{
__pParentForm->SetKeypadShowState(true);
}
+ SysLog(NID_UI_CTRL, "[EDIT] INPUT_PANEL_SHOW_STATE_SHOW - Draw Form");
__pParentForm->Draw();
}
}
+
+ if (__isUSBKeyboardConnected && __isKeypadCommandButtonVisible)
+ {
+ __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
+ }
+ else
+ {
+ __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
+ __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
+ }
}
else if (showState == INPUT_PANEL_SHOW_STATE_HIDE)// 1.unbound 2.bounded&usb off -> usb on 3.Flick keypad hide
{
+ SysLog(NID_UI_CTRL, "[EDIT] INPUT_PANEL_SHOW_STATE_HIDE");
+
CheckUSBKeyboardStatus();
__isKeypadExist = false;
}
else// called by focus move or HideKeypad() api call
{
- SetKeypadClosedEventSkipped(true);//it will adjust only fullscreen keypad edit.
-
if (__pCommandButton && __isKeypadCommandButtonVisible)
{
SetFooterVisible(true);// must be called ahead of DeflateClientRectHeight
}
}
- if (!__isKeypadClosedEventSkipped)
- {
- if (__isUSBKeyboardConnected)
- {
- __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
- }
- else
- {
- __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE);
- __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CLOSED);
- }
- }
-
- __isKeypadClosedEventSkipped = false;
-
if (!__pEdit->IsFullScreenKeypadEdit())
{
if (__pParentForm)
{
__pParentForm->SetKeypadShowState(false);
}
+ SysLog(NID_UI_CTRL, "[EDIT] INPUT_PANEL_SHOW_STATE_HIDE - Draw Form");
__pParentForm->Draw();
}
}
+
+ if (__isUSBKeyboardConnected && __isKeypadCommandButtonVisible)
+ {
+ __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
+ }
+ else
+ {
+ __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE);
+ __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CLOSED);
+ }
}
return;
{
CheckUSBKeyboardStatus();
- if ((__isUSBKeyboardConnected == false) && (__isKeypadExist == false))
+ if ((__isUSBKeyboardConnected == false) && ((__isKeypadExist == false) || (__isKeypadShowing == true)))
{
+ SysLog(NID_UI_CTRL, "[EDIT] OnInputConnectionPanelBoundsChanged skipped!!!!!!");
return;
}
+ SysLog(NID_UI_CTRL, "[EDIT] OnInputConnectionPanelBoundsChanged");
ChangeLayoutInternal(__pEdit->GetOrientation());
AdjustParentPanelHeight(false, true);
+
if (__pParentForm)
{
- __pParentForm->Draw();
+ ScrollPanelToExposedRegion(true);
ScrollPanelToCursorPosition();
+ __pParentForm->Draw();
+ SysLog(NID_UI_CTRL, "[EDIT] OnInputConnectionPanelBoundsChanged - Draw Form");
}
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
{
FloatDimension floatClipboardPopupSize = _CoordinateSystemUtils::ConvertToFloat(clipboardPopupSize);
- SysLog(NID_UI_CTRL, "clipboard opended!: EditPresent(%x), clipboard connected(%d)", this, __clipboardConnected);
+ SysLog(NID_UI_CTRL, "[EDIT] clipboard opended!: EditPresent(%x), clipboard connected(%d)", this, __clipboardConnected);
if (__clipboardConnected)
{
__clipboardHeight = floatClipboardPopupSize.height;
- SysLog(NID_UI_CTRL, "clipboard height = %f, keypad height = %f", floatClipboardPopupSize.height, absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "[EDIT] clipboard height = %f, keypad height = %f", floatClipboardPopupSize.height, absKeypadBounds.height);
if (__isKeypadExist) //resize as difference between clipboard height vs keypad height
{
{
FloatDimension floatClipboardPopupSize = _CoordinateSystemUtils::ConvertToFloat(clipboardPopupSize);
- SysLog(NID_UI_CTRL, "clipboard rotated!: EditPresent(%x), clipboard connected(%d)", this, __clipboardConnected);
+ SysLog(NID_UI_CTRL, "[EDIT] clipboard rotated!: EditPresent(%x), clipboard connected(%d)", this, __clipboardConnected);
if (__clipboardConnected)
{
__clipboardHeight = floatClipboardPopupSize.height;
- SysLog(NID_UI_CTRL, "clipboard height = %f, keypad height = %f", floatClipboardPopupSize.height, absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "[EDIT] clipboard height = %f, keypad height = %f", floatClipboardPopupSize.height, absKeypadBounds.height);
if (__isKeypadExist)
{
if (__pParentForm)
{
__pParentForm->Draw();
+ ScrollPanelToExposedRegion(true);
ScrollPanelToCursorPosition();
}
if (__pParentForm)
{
__pParentForm->Draw();
+ ScrollPanelToExposedRegion(true);
ScrollPanelToCursorPosition();
}
void
_EditPresenter::OnClipboardPopupClosed(void)
{
- SysLog(NID_UI_CTRL, "clipboard closed!: EditPresent(%x), clipboard connected(%d)", this, __clipboardConnected);
+ SysLog(NID_UI_CTRL, "[EDIT] clipboard closed!: EditPresent(%x), clipboard connected(%d)", this, __clipboardConnected);
if (__clipboardConnected)
{
__clipboardHeight = 0.0f;
- SysLog(NID_UI_CTRL, "clipboard closed!keypad height = %f", absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "[EDIT] clipboard closed! keypad height = %f", absKeypadBounds.height);
ChangeLayoutInternal(__pEdit->GetOrientation());
if (__isKeypadExist)
{
AdjustParentPanelHeight(false, true);
+
+ if (__pParentForm)
+ {
+ __pParentForm->Draw();
+ }
+
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
}
else
__pCurrentFrame = null;
}
- if (__pCommandButton && __pCommandButton->GetVisibleState() == true)
+ if (__pCommandButton && __isKeypadCommandButtonVisible)
{
__pCommandButton->SetVisibleState(false);
if (__isKeypadCommandButtonVisible && !__isUSBKeyboardConnected)
__pCommandButton = null;
}
- if (__pParentForm)
+ if (__isInputConnectionBound)
{
- __pParentForm->DeflateClientRectHeight(0.0f);
- }
+ if (__pParentForm)
+ {
+ __pParentForm->DeflateClientRectHeight(0.0f);
+ __pParentForm->SetKeypadShowState(false);
- if (__pEdit && !__pEdit->IsDestroyed())//skip when force deleted
- {
- AdjustParentPanelHeight(true);
+ if (__pParentForm->GetFooter())
+ {
+ if (__pParentForm->GetFooter()->GetButton(BACK_BUTTON))
+ {
+ __pParentForm->GetFooter()->Invalidate(true);
+ }
+ }
+
+ if (__pParentForm->GetHeader())
+ {
+ if (__pParentForm->GetHeader()->GetButton(BACK_BUTTON))
+ {
+ __pParentForm->GetHeader()->Invalidate(true);
+ }
+ }
+ }
+
+ if (__pEdit && !__pEdit->IsDestroyed())//restore ScrollPanel when force deleted
+ {
+ AdjustParentPanelHeight(true);
+ }
+
+ __isKeypadExist = false;
}
if (__clipboardConnected)
{
pEditBgEffectBitmap = __pEdit->GetDefaultBackgroundEffectBitmap();
- if (borderRoundEnable)
- {
- pEditBgEffectBitmap = null;
- r = GET_BITMAP_CONFIG_N(EDIT::BG_ROUND_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pEditBgEffectBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- }
-
if (pEditBgEffectBitmap)
{
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pEditBgEffectBitmap))
return E_SUCCESS;
}
+bool
+_EditPresenter::CheckKeypadExist(void)
+{
+ FloatDimension screenSize;
+ FloatRectangle absKeypadBounds(0.0f, 0.0f, 0.0f, 0.0f);
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+
+ GetKeypadBounds(absKeypadBounds);
+ SysLog(NID_UI_CTRL, "[EDIT] CheckKeypadExist:absKeypadBounds(%f, %f, %f, %f)", absKeypadBounds.x, absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height);
+ _ControlOrientation orientation = __pEdit->GetOrientation();
+
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ screenSize.height = pControlManager->GetScreenSizeF().height;
+ }
+ else
+ {
+ screenSize.height = pControlManager->GetScreenSizeF().width;
+ }
+
+ if (absKeypadBounds.y != screenSize.height)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
result
_EditPresenter::ShowKeypad(bool focus)
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
__pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
}
+
+ ScrollPanelToExposedRegion(true);
+ ScrollPanelToCursorPosition();
}
else
{
+ __isKeypadExist = CheckKeypadExist(); //call once only from here.
+
__pInputConnection->ShowInputPanel();
if (!__isKeypadExist)
if (__isKeypadExist)
{
- ChangeLayoutInternal(__pEdit->GetOrientation(), false);
- //AdjustParentPanelHeight(false);
+ ChangeLayoutInternal(__pEdit->GetOrientation());
+ //ChangeLayoutInternal(__pEdit->GetOrientation(), false);
+ ScrollPanelToExposedRegion(true);
+ ScrollPanelToCursorPosition();
+ if (__pParentForm)
+ {
+ __pParentForm->SetKeypadShowState(true);//First show keypad after dispose
+ __pParentForm->Draw();
+ }
+ }
+ else
+ {
+ ScrollPanelToExposedRegion(true);
+ ScrollPanelToCursorPosition();
}
}
}
- ScrollPanelToExposedRegion(true);
- ScrollPanelToCursorPosition();
-
return E_SUCCESS;
}
__pParentForm->DeflateClientRectHeight(0.0f);
}
- if (__pCommandButton && __pCommandButton->GetVisibleState())
+ if (__pCommandButton && __isKeypadCommandButtonVisible)
{
__pCommandButton->SetVisibleState(false);
}
}
else
{
- if (__pCommandButton && __pCommandButton->GetVisibleState() == true)
+ if (__pCommandButton && __isKeypadCommandButtonVisible)
{
if (!__isKeypadExist)
{
}
void
-_EditPresenter::SetKeypadClosedEventSkipped(bool enabled)
-{
- if (__pEdit->IsFullScreenKeypadEdit())
- {
- __isKeypadClosedEventSkipped = enabled;
- }
-
- return;
-}
-
-void
_EditPresenter::PostInternalEvent(const Tizen::Base::String& type)
{
ClearLastResult();