fixed bug (TapGesture improvement)
authorChulheon <ch.jeong47@samsung.com>
Thu, 2 May 2013 11:36:28 +0000 (20:36 +0900)
committerChulheon <ch.jeong47@samsung.com>
Thu, 2 May 2013 11:40:10 +0000 (20:40 +0900)
Change-Id: Ib6c0ed89070dbe6185c2483cbc152fa2878b4e53

src/ui/controls/FUiCtrl_Edit.cpp
src/ui/controls/FUiCtrl_EditPresenter.cpp

index 951eae0..7f31af7 100644 (file)
@@ -49,6 +49,8 @@ using namespace Tizen::System;
 
 namespace Tizen { namespace Ui { namespace Controls
 {
+const int EDIT_GESTURE_TAP_INTERVAL = 400;
+const int EDIT_GESTURE_TAP_MOVE_ALLOWANCE = 50;
 
 class _EditInternalTouchEventListener
        : public _ITouchEventListener
@@ -456,6 +458,13 @@ _Edit::Initialize(int editStyle, InputStyle inputStyle, int limitLength, GroupSt
 
        __pGestureTap = new (std::nothrow) _TouchTapGestureDetector;
        SysTryReturn(NID_UI_CTRL, __pGestureTap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create touch tap gesture.");
+
+       r = __pGestureTap->SetTapInterval(EDIT_GESTURE_TAP_INTERVAL);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set TapInterval", GetErrorMessage(r));
+
+       r = __pGestureTap->SetMoveAllowance(EDIT_GESTURE_TAP_MOVE_ALLOWANCE);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set TapMoveAllowance", GetErrorMessage(r));
+
        r = AddGestureDetector(*__pGestureTap);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture detector", GetErrorMessage(r));
        r = __pGestureTap->AddGestureListener(*this);
index ffbe02c..d077851 100644 (file)
@@ -3805,6 +3805,8 @@ CATCH:
 bool
 _EditPresenter::OnLongPressGestureDetected(void)
 {
+       SysLog(NID_UI_CTRL, "[EDIT] OnLongPressGestureDetected");
+
        if (__isClearIconPressed)
        {
                return true;
@@ -3863,6 +3865,8 @@ _EditPresenter::OnLongPressGestureDetected(void)
 bool
 _EditPresenter::OnTapGestureDetected(void)
 {
+       SysLog(NID_UI_CTRL, "[EDIT] OnTapGestureDetected");
+
        if (IsInternalFocused() == false)
        {
                return true;
@@ -6380,6 +6384,7 @@ _EditPresenter::ShowKeypad(bool focus)
                                __pParentForm->SetKeypadShowState(true);//First show keypad after dispose
                                __pParentForm->Draw();
                        }
+                       __isKeypadShowing = false;
                }
                else
                {