Fix for N_SE-33987
authorAyush <ayush.sriv@samsung.com>
Fri, 12 Apr 2013 05:55:35 +0000 (11:25 +0530)
committerAyush <ayush.sriv@samsung.com>
Fri, 12 Apr 2013 05:55:35 +0000 (11:25 +0530)
Change-Id: I777216c194287bbc71a35faad24ef5e37c66f0d7
Signed-off-by: Ayush <ayush.sriv@samsung.com>
src/ui/controls/FUiCtrl_SearchBar.cpp
src/ui/controls/FUiCtrl_SearchBarPresenter.cpp
src/ui/inc/FUiCtrl_SearchBar.h

index 574d18d..796a91b 100644 (file)
@@ -67,6 +67,7 @@ _SearchBar::_SearchBar(void)
        , __isUserContainerBounds(false)
        , __isCancelActionInProgress(false)
        , __isUserGuideTextColor(false)
+       , __isKeypadOpening(false)
        , __keypadAction(CORE_KEYPAD_ACTION_SEARCH)
        , __pBackgroundBitmap(null)
        , __backgroundColor(Color())
@@ -1606,14 +1607,19 @@ _SearchBar::OnActionPerformed(const _Control& source, int actionId)
 void
 _SearchBar::OnKeypadWillOpen(void)
 {
-       if (__pKeypadEvent)
+       if (!__isKeypadOpening)
        {
-               IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CREATED);
-               result r = GetLastResult();
-               SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+               if (__pKeypadEvent)
+               {
+                       IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CREATED);
+                       result r = GetLastResult();
+                       SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
 
-               __pKeypadEvent->Fire(*pEventArg);
+                       __pKeypadEvent->Fire(*pEventArg);
+               }
        }
+
+       __isKeypadOpening = true;
        return;
 }
 
@@ -1628,6 +1634,8 @@ _SearchBar::OnKeypadOpened(void)
 
                __pKeypadEvent->Fire(*pEventArg);
        }
+
+       __isKeypadOpening = false;
        return;
 }
 
index de4d78f..852de4c 100755 (executable)
@@ -481,6 +481,7 @@ _SearchBarPresenter::ChangeMode(SearchBarMode mode)
                        {
                                __pEdit->SetBounds(__searchFieldBounds);
                        }
+                       __pEdit->ShowKeypad();
                }
                __pSearchBar->SetContentsArea();
 
index 750fcf9..ed78f3b 100644 (file)
@@ -292,6 +292,7 @@ private:
        bool __isUserContainerBounds;
        bool __isCancelActionInProgress;
        bool __isUserGuideTextColor;
+       bool __isKeypadOpening;
 
        CoreKeypadAction __keypadAction;