Fixed Nabi Issues 47903,47887,47972
[apps/osp/Internet.git] / src / IntBookmarkListForm.cpp
index 8015f81..e4d15fd 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
@@ -80,6 +80,7 @@ BookmarkListForm::BookmarkListForm(void)
        __selectedindex = 0;
        __searchText = L"";
        __previousSceneId = L"";
+       __fontSize = 44;
 }
 
 BookmarkListForm::~BookmarkListForm(void)
@@ -134,8 +135,6 @@ BookmarkListForm::OnInitializing(void)
        result r = E_SUCCESS;
        HeaderItem bookmark;
        HeaderItem history;
-       Bitmap *pBitmapNormal = null;
-       Bitmap *pBitmapPressed = null;
        Header *pHeader = GetHeader();
        Bitmap *pIconBitmap = null;
        AppResource* pAppResource = UiApp::GetInstance()->GetAppResource();
@@ -158,48 +157,26 @@ BookmarkListForm::OnInitializing(void)
                return E_FAILURE;
        }
 
+       __fontSize = CommonUtil::GetFontSize();
        __pItemContextFolder = new(std::nothrow) ListContextItem();
        __pItemContextFolder->Construct();
        __pItemContextFolder->AddElement(IDA_CONTEXT_ITEM_FOLDER_EDIT, CommonUtil::GetString(L"IDS_BR_SK_EDIT"));
-       pBitmapNormal = CommonUtil::GetNinepatchedBitmapN(L"00_button_sweep_delete.9.png", WIDTH_CONTEXT_MENU_TWO_BUTTON, HEIGHT_CONTEXT_MENU_BUTTON);
-       pBitmapPressed = CommonUtil::GetNinepatchedBitmapN(L"00_button_sweep_delete_press.9.png", WIDTH_CONTEXT_MENU_TWO_BUTTON, HEIGHT_CONTEXT_MENU_BUTTON);
 
-       if (pBitmapNormal != null && pBitmapPressed != null)
-       {
-               __pItemContextFolder->AddElement(IDA_CONTEXT_ITEM_FOLDER_DELETE, CommonUtil::GetString(L"IDS_BR_SK_DELETE_ABB"),  *pBitmapNormal, *pBitmapPressed, pBitmapPressed);
-       }
-
-       if (pBitmapNormal != null)
-       {
-               delete pBitmapNormal;
-       }
-
-       if (pBitmapPressed != null)
-       {
-               delete pBitmapPressed;
-       }
+       __pItemContextFolder->AddElement(IDA_CONTEXT_ITEM_FOLDER_DELETE, CommonUtil::GetString(L"IDS_BR_SK_DELETE_ABB"), true);
+       __pItemContextFolder->SetElementBackgroundColor(IDA_CONTEXT_ITEM_FOLDER_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL , CONTEXT_ITEM_DELETE_COLOR);
+       __pItemContextFolder->SetElementBackgroundColor(IDA_CONTEXT_ITEM_FOLDER_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED , CONTEXT_ITEM_DELETE_COLOR);
+       __pItemContextFolder->SetElementBackgroundColor(IDA_CONTEXT_ITEM_FOLDER_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED , CONTEXT_ITEM_DELETE_COLOR);
 
        __pItemContextSite = new(std::nothrow) ListContextItem();
        __pItemContextSite->Construct();
        __pItemContextSite->AddElement(IDA_CONTEXT_ITEM_EDIT, CommonUtil::GetString(L"IDS_BR_SK_EDIT"));
        __pItemContextSite->AddElement(IDA_CONTEXT_ITEM_SHARE, CommonUtil::GetString(L"IDS_BR_OPT_SHARE"));
-       pBitmapNormal = CommonUtil::GetNinepatchedBitmapN(L"00_button_sweep_delete.9.png", WIDTH_CONTEXT_MENU_THREE_BUTTON, HEIGHT_CONTEXT_MENU_BUTTON);
-       pBitmapPressed = CommonUtil::GetNinepatchedBitmapN(L"00_button_sweep_delete_press.9.png", WIDTH_CONTEXT_MENU_THREE_BUTTON, HEIGHT_CONTEXT_MENU_BUTTON);
-
-       if (pBitmapNormal != null && pBitmapPressed != null)
-       {
-               __pItemContextSite->AddElement(IDA_CONTEXT_ITEM_DELETE, CommonUtil::GetString(L"IDS_BR_SK_DELETE_ABB"), *pBitmapNormal, *pBitmapPressed, pBitmapPressed);
-       }
 
-       if (pBitmapNormal != null)
-       {
-               delete pBitmapNormal;
-       }
+       __pItemContextSite->AddElement(IDA_CONTEXT_ITEM_DELETE, CommonUtil::GetString(L"IDS_BR_SK_DELETE_ABB"), true);
+       __pItemContextSite->SetElementBackgroundColor(IDA_CONTEXT_ITEM_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL , CONTEXT_ITEM_DELETE_COLOR);
+       __pItemContextSite->SetElementBackgroundColor(IDA_CONTEXT_ITEM_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED , CONTEXT_ITEM_DELETE_COLOR);
+       __pItemContextSite->SetElementBackgroundColor(IDA_CONTEXT_ITEM_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED , CONTEXT_ITEM_DELETE_COLOR);
 
-       if (pBitmapPressed != null)
-       {
-               delete pBitmapPressed;
-       }
        __pListview = static_cast< ListView* >(GetControl("IDC_LISTVIEW1"));
 
        if (__pListview == null)
@@ -213,8 +190,10 @@ BookmarkListForm::OnInitializing(void)
                return E_FAILURE;
        }
 
+       __pSearchBar->AddFocusEventListener(*this);
        if (__pListview != null)
        {
+               __pListview->SetBackgroundColor(GetBackgroundColor());
                //              __pListview->SetBounds(__pListview->GetX(), __pListview->GetY(), GetClientAreaBounds().width, GetClientAreaBounds().height);
                __pListview->AddFastScrollListener(*this);
                __pListview->AddListViewItemEventListener(*this);
@@ -227,7 +206,7 @@ BookmarkListForm::OnInitializing(void)
        if (__pPopUp != null)
        {
                __pPopUp->Initialize();
-               AddControl(*__pPopUp);
+//             AddControl(__pPopUp);
        }
 
        __pSearchListView = new(std::nothrow) ListView();
@@ -237,9 +216,10 @@ BookmarkListForm::OnInitializing(void)
                return E_FAILURE;
        }
 
-       r = __pSearchListView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height -72 - 30), true, false);
+       r = __pSearchListView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height -72), true, false);
        TryCatch( !IsFailed(r),,"BookmarkListForm::OnSearchBarModeChanged Update list failed %s",GetErrorMessage(r));
 
+       __pSearchListView->SetBackgroundColor(GetBackgroundColor());
        __pSearchListView->SetItemProvider(*this);
        __pSearchListView->SetTextOfEmptyList(CommonUtil::GetString(L"IDS_BR_BODY_NO_RESULTS_FOUND"));
        __pSearchListView->SetTextColorOfEmptyList(Color::GetColor(COLOR_ID_BLACK));
@@ -289,6 +269,7 @@ BookmarkListForm::OnInitializing(void)
                history.SetIcon(HEADER_ITEM_STATUS_PRESSED, pIconBitmap);
                pHeader->AddItem(history);
                pHeader->SetItemSelected(0);
+               pHeader->SetTabEditModeEnabled(false);
 
                if (pIconBitmap != NULL)
                {
@@ -312,6 +293,7 @@ BookmarkListForm::OnActionPerformed(const Tizen::Ui::Control& source, int action
        {
        case IDA_FOOTER_ITEM1:
        {
+               __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
                GetHeader()->SetItemSelected(0);
                GetHeader()->Invalidate(true);
                SceneManager* pSceneManager = SceneManager::GetInstance();
@@ -352,8 +334,8 @@ BookmarkListForm::OnActionPerformed(const Tizen::Ui::Control& source, int action
        break;
        case IDA_TABBAR_ITEM_2:
        {
-               GetHeader()->SetItemSelected(0);
-               GetHeader()->Invalidate(true);
+       //      GetHeader()->SetItemSelected(0);
+       //      GetHeader()->Invalidate(true);
 
                SceneManager* pSceneManager = SceneManager::GetInstance();
 
@@ -370,7 +352,7 @@ BookmarkListForm::OnActionPerformed(const Tizen::Ui::Control& source, int action
                        else
                        {
 
-                               if(pSceneManager->GoBackward(BackwardSceneTransition())!= E_SUCCESS)
+                               if(pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT))!= E_SUCCESS)
                                {
                                        AppLogDebug("BookmarkListForm::OnActionPerformed GoBackward failed");
                                        return;
@@ -570,7 +552,7 @@ BookmarkListForm::CreateItem(int index, int itemWidth)
        const int width_Icon = 72 ;
        const int x_Margin_Title = 104 ;
        const int y_Margin_Title = 10;
-       const int width_Title = GetClientAreaBounds().width - 108 - 52 - 30;
+       const int width_Title = GetClientAreaBounds().width - 108 - 52 - 40;
        const int x_Margin_Url = 104 ;
        const int y_Margin_Url = 70 ;
        const int width_Url = GetClientAreaBounds().width - 108 - 52 ;
@@ -583,21 +565,23 @@ BookmarkListForm::CreateItem(int index, int itemWidth)
        {
                delete pItem;
                pItem = null;
+               delete pImage;
+               pImage = null;
                return NULL;
        }
        if ( pBookMark->GetBookmarkType() == BOOKMARK_TYPE_FOLDER )
        {
-               r = pItem->Construct(Tizen::Graphics::Dimension(itemWidth,112), LIST_ANNEX_STYLE_DETAILED);
+               r = pItem->Construct(Tizen::Graphics::Dimension(itemWidth,112 - 44 + __fontSize), LIST_ANNEX_STYLE_DETAILED);
                TryCatch(!IsFailed(r),,"BookmarkListForm::CreateItem Construct failed %s",GetErrorMessage(r));
 
                pBitmap = AppResource::GetInstance()->GetBitmapN(IDB_ICON_FOLDER_OPEN);
                if (pBitmap != null)
                {
-                       pItem->AddElement(Rectangle(x_Margin_Icon, 20, width_Icon, height_Icon), IDA_FORMAT_ICON, *pBitmap, null);
+                       pItem->AddElement(Rectangle(x_Margin_Icon, 20+(__fontSize - 44)/2, width_Icon, height_Icon), IDA_FORMAT_ICON, *pBitmap, null);
                        delete pBitmap;
                }
 
-               pItem->AddElement(Rectangle(x_Margin_Title, 26, width_Title, 60), IDA_FORMAT_FOLDER, pBookMark->GetBookmarkTitle(), true);
+               pItem->AddElement(Rectangle(x_Margin_Title, 26, width_Title, 72 + (__fontSize - 44) ), IDA_FORMAT_FOLDER, pBookMark->GetBookmarkTitle(),__fontSize, CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
 
                if ( __pItemContextFolder != NULL)
                {
@@ -606,7 +590,7 @@ BookmarkListForm::CreateItem(int index, int itemWidth)
        }
        else
        {
-               r = pItem->Construct(Tizen::Graphics::Dimension(itemWidth, itemHeight), style);
+               r = pItem->Construct(Tizen::Graphics::Dimension(itemWidth, itemHeight - 44 + __fontSize), style);
                TryCatch( !IsFailed(r),,"BookmarkListForm::CreateItem Construct failed %s",GetErrorMessage(r));
 
                AppLogDebug("BookmarkListForm::faviconid %ls",pBookMark->GetFaviconId().GetPointer());
@@ -655,12 +639,12 @@ BookmarkListForm::CreateItem(int index, int itemWidth)
                        AppLogDebug("BookmarkListForm::CreateItem bitmap is null");
                        pBitmap = FaviconManager::GetInstance()->GetDefaultFaviconN();
                }
-               pItem->AddElement(Rectangle(x_Margin_Icon, y_Margin_Icon, width_Icon, height_Icon), IDA_FORMAT_ICON, *pBitmap, null);
-               pItem->AddElement(Rectangle(x_Margin_Title, 0, width_Title, itemHeight - height_Url), IDA_FORMAT_SITE, pBookMark->GetBookmarkTitle(),44,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
-               if(__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
-                       pItem->AddElement(Rectangle(x_Margin_Url, y_Margin_Url, width_Url, height_Url), IDA_FORMAT_URL, pBookMark->GetUrl(),textSize,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
-               else
-                       pItem->AddElement(Rectangle(x_Margin_Url, y_Margin_Url, width_Url, height_Url), IDA_FORMAT_URL, pBookMark->GetUrl(),textSize,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,true);
+               pItem->AddElement(Rectangle(x_Margin_Icon, y_Margin_Icon +(__fontSize - 44)/2, width_Icon, height_Icon), IDA_FORMAT_ICON, *pBitmap, null);
+               pItem->AddElement(Rectangle(x_Margin_Title, 0, width_Title, itemHeight - height_Url - 44 + __fontSize), IDA_FORMAT_SITE, pBookMark->GetBookmarkTitle(),__fontSize,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
+//             if(__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
+//                     pItem->AddElement(Rectangle(x_Margin_Url, y_Margin_Url, width_Url, height_Url), IDA_FORMAT_URL, pBookMark->GetUrl(),textSize,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
+//             else
+                       pItem->AddElement(Rectangle(x_Margin_Url, y_Margin_Url - 44 + __fontSize, width_Url, height_Url), IDA_FORMAT_URL, pBookMark->GetUrl(),textSize,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,true);
 
                if (pBitmap != null)
                {
@@ -671,17 +655,13 @@ BookmarkListForm::CreateItem(int index, int itemWidth)
                        pItem->SetContextItem(__pItemContextSite);
                }
        }
-       if(pImage != null)
-       {
-               delete pImage;
-       }
+
+       delete pImage;
        return pItem;
 
        CATCH:
-       if(pImage != null)
-       {
-               delete pImage;
-       }
+
+       delete pImage;
        delete pItem;
        pItem = null;
        return null;
@@ -717,11 +697,16 @@ BookmarkListForm::GetItemCount(void)
        }
        else
        {
+               if (__searchText.GetLength() > 0)
+               {
+                       __searchText.Replace(L"%", L"/%");
+                       __searchText.Replace(L"_", L"/_");
+               }
                BookmarkPresentationModel::GetInstance()->GetSearchFolderBookmarkCount(count,__searchText);
                BookmarkPresentationModel::GetInstance()->GetSearchFoldersBookmarks(0, count, *__pData, __searchText);
        }
 
-       AppLogDebug("Count = %d parentId = %ls", count, __parentID.GetPointer());
+       AppLogDebug("Count = %d parentId = %ls __searchText %ls", count, __parentID.GetPointer() , __searchText.GetPointer());
 
        if (count <= 0)
        {
@@ -806,7 +791,7 @@ BookmarkListForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListVie
                        pArgList = new(std::nothrow) ArrayList();
                        if (pArgList != null)
                        {
-                               pEdit= new(std::nothrow) String(CommonUtil::GetString(L"IDS_BR_HEADER_EDIT_FOLDER"));
+                               pEdit= new(std::nothrow) String(CommonUtil::GetString(L"IDS_BR_SK_EDIT"));
                                pArgList->Construct();
                                pArgList->Add(*new(std::nothrow) BookmarkData(*pBookMark));
                                pArgList->Add(*pEdit);
@@ -881,7 +866,13 @@ BookmarkListForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListVie
        case IDA_CONTEXT_ITEM_SHARE:
        {
                AppLogDebug("OnListViewContextItemStateChanged Share");
-
+               if (__pPopUp != null)
+               {
+                       delete __pPopUp;
+                       __pPopUp = null;
+               }
+               __pPopUp = new(std::nothrow) SharePopup();
+               __pPopUp->Initialize();
                BookmarkData* pBookmark = dynamic_cast<BookmarkData*>(__pData->GetAt(index));
                if (pBookmark != null)
                {
@@ -893,11 +884,9 @@ BookmarkListForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListVie
                        __pPopUp->AddShareInfo(pShareInfo);
                }
 
-               if (__pPopUp != null)
-               {
-                       __pPopUp->SetShowState(true);
-                       __pPopUp->Show();
-               }
+               __pPopUp->SetShowState(true);
+               __pPopUp->Show();
+
        }
        break;
        default:
@@ -1004,9 +993,23 @@ BookmarkListForm::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::B
 }
 
 void
+BookmarkListForm::OnFocusGained(const Tizen::Ui::Control& source)
+{
+       __pSearchListView->SetEnabled(false);
+}
+
+void
+BookmarkListForm::OnFocusLost(const Tizen::Ui::Control& source)
+{
+       __pSearchListView->SetEnabled(true);
+       __searchBookmark = false;
+}
+
+void
 BookmarkListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, Tizen::Ui::Controls::SearchBarMode mode)
 {
        result r = E_FAILURE;
+       AppLog("ABCD::BookmarkListForm::OnSearchBarModeChanged");
 
        if (mode == SEARCH_BAR_MODE_NORMAL)
        {
@@ -1016,7 +1019,7 @@ BookmarkListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source,
                Invalidate(true);
                __searchBookmark = false;
                r = __pListview->UpdateList();
-               __pSearchListView->SetBounds(0,0,GetClientAreaBounds().width,GetClientAreaBounds().height -__pSearchBar->GetHeight());
+//             __pSearchListView->SetBounds(0,0,GetClientAreaBounds().width,GetClientAreaBounds().height -__pSearchBar->GetHeight());
                __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), __pSearchListView->GetHeight()));
                TryCatch( !IsFailed(r),,"BookmarkListForm::OnSearchBarModeChanged Update list failed %s",GetErrorMessage(r));
                CATCH:return;
@@ -1029,10 +1032,10 @@ BookmarkListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source,
 
                if(__pSearchBar)
                {
-                       __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), __pSearchListView->GetHeight()));
+                       r = __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), __pSearchListView->GetHeight()));
                        __pSearchBar->SetText(L"");
                }
-               AppLog("OnSearchBarModeChanged SetContentAreaSize heihgt %d",__pSearchListView->GetHeight());
+               AppLog("OnSearchBarModeChanged SetContentAreaSize heihgt %d, %d",__pSearchListView->GetHeight() , GetClientAreaBounds().height - __pSearchBar->GetHeight());
                 __pListview->UpdateList();
                __pSearchListView->UpdateList();
        }
@@ -1041,32 +1044,39 @@ BookmarkListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source,
 void
 BookmarkListForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
 {
+       AppLog("ABCD::BookmarkListForm::OnKeypadWillOpen");
        GetFooter()->SetShowState(false);
-       __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), __pSearchListView->GetWidth(), __pSearchListView->GetHeight() + GetFooter()->GetHeight());
+       __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight());
        __pSearchListView->SetEnabled(false);
-       __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), __pSearchListView->GetHeight()));
+       __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight()));
        Invalidate(true);
-       __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), __pSearchListView->GetWidth(), __pSearchListView->GetHeight() - GetFooter()->GetHeight());
 }
 
 void
 BookmarkListForm::OnKeypadOpened(Tizen::Ui::Control& source)
 {
-
-       __pSearchListView->UpdateList();
+       AppLog("ABCD::BookmarkListForm::OnKeypadOpened");
+       GetFooter()->SetShowState(false);
+       AppLog("ABCD::BookmarkListForm::OnKeypadOpened");
+       __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), __pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
+       __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight()));
+       Invalidate(true);
 }
 
 void
 BookmarkListForm::OnKeypadClosed(Tizen::Ui::Control& source)
 {
-
+       AppLog("ABCD::BookmarkListForm::OnKeypadClosed");
+       AppLog("jahsjkdad %d",Clipboard::GetInstance()->IsPopupVisible());
+       if(Clipboard::GetInstance()->IsPopupVisible() == true)
+       {
+               return;
+       }
        GetFooter()->SetShowState(true);
-       GetFooter()->Invalidate(true);
        __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), __pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
-       __pListview->SetBounds(__pSearchListView->GetX(), __pSearchBar->GetY() + __pSearchBar->GetHeight(), __pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
        __pSearchListView->Invalidate(false);
-       __pSearchListView->SetEnabled(true);
        __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight()));
+       __pListview->SetBounds(0, __pSearchBar->GetY() + __pSearchBar->GetHeight(), GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight());
        Invalidate(true);
 }
 
@@ -1079,15 +1089,20 @@ BookmarkListForm::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui:
        {
                __pSearchBar->HideKeypad();
        }
-
        if ( __pSearchBar != null && keypadAction == KEYPAD_ACTION_SEARCH)
        {
-               if (__pSearchBar->GetText().GetLength() == 0)
+//             if (__pSearchBar->GetText().GetLength() == 0)
+//             {
+//                     return;
+//             }
+
+               if (__pSearchBar != null)
                {
-                       return;
+                       __pSearchBar->HideKeypad();
                }
 
                __searchText = __pSearchBar->GetText();
+               AppLog("SearchbarGettext result %s %ls",GetErrorMessage(GetLastResult()),__searchText.GetPointer());
                __searchBookmark = true;
                __pListview->SetShowState(false);
                __pSearchListView->SetEnabled(true);
@@ -1101,6 +1116,19 @@ BookmarkListForm::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui:
 }
 
 void
+BookmarkListForm::OnKeypadBoundsChanged(Tizen::Ui::Control& source)
+{
+       FloatRectangle clientRect;
+       clientRect = GetClientAreaBoundsF();
+       AppLogDebug("SearchBarForm::OnKeypadBoundsChanged ClientBounds(%f, %f, %f, %f)",clientRect.x, clientRect.y, clientRect.width, clientRect.height);
+       __pSearchBar->SetContentAreaSize(FloatDimension(clientRect.width, clientRect.height - __pSearchBar->GetHeightF()));
+       __pSearchListView->SetSize(FloatDimension(clientRect.width, clientRect.height - __pSearchBar->GetHeightF()));
+       __pListview->SetSize(FloatDimension(clientRect.width, clientRect.height - __pSearchBar->GetHeightF()));
+//     __pListview->SetEnabled(false);
+       Invalidate(true);
+}
+
+void
 BookmarkListForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
 {
        AppLogDebug("BookmarkListForm::OnSceneActivatedN called");
@@ -1121,6 +1149,12 @@ BookmarkListForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneI
                __previousSceneId = previousSceneId;
        }*/
 
+       if (pList)
+       {
+               delete pList;
+               pList = null;
+       }
+
        if (__pListview != null)
        {
                __pListview->UpdateList();
@@ -1133,7 +1167,8 @@ void
 BookmarkListForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen::Ui::OrientationStatus orientationStatus)
 {
        AppLog("BookmarkListForm::OnOrientationChanged start");
-
+       __pListview->SetBackgroundColor(GetBackgroundColor());
+       __pSearchListView->SetBackgroundColor(GetBackgroundColor());
        if (__pListview)
        {
                if(__pSearchBar->GetShowState())
@@ -1164,9 +1199,20 @@ BookmarkListForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen:
                        __pSearchBar->Invalidate(true);
                }
 
-               __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), GetClientAreaBounds().height));
+               __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight()));
        }
 
+//
+//
+//
+//     FloatRectangle clientRect;
+//     clientRect = GetClientAreaBoundsF();
+//
+//     __pSearchBar->SetContentAreaSize(FloatDimension(clientRect.width, clientRect.height - __pSearchBar->GetHeightF()));
+//     __pListview->SetSize(FloatDimension(clientRect.width, clientRect.height - __pSearchBar->GetHeightF()));
+//     __pSearchListView->SetSize(FloatDimension(clientRect.width, clientRect.height - __pSearchBar->GetHeightF()));
+//     Invalidate(true);
+//
 
        Invalidate(true);
 }
@@ -1174,12 +1220,6 @@ BookmarkListForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen:
 void
 BookmarkListForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
-       if (__pData != null)
-       {
-               __pData->RemoveAll(true);
-               delete __pData;
-               __pData = null;
-       }
        __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
        return;
 }