2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file MpSearchForm.cpp
19 * @brief This is the implementation file for SearchForm class.
22 #include "MpSearchForm.h"
23 #include "MpMusicPlayerApp.h"
25 using namespace Tizen::App;
26 using namespace Tizen::Base;
27 using namespace Tizen::Base::Collection;
28 using namespace Tizen::Content;
29 using namespace Tizen::Graphics;
30 using namespace Tizen::Media;
31 using namespace Tizen::Ui;
32 using namespace Tizen::Ui::Controls;
33 using namespace Tizen::Ui::Scenes;
35 static const int H_SEARCH_BAR = 86;
36 static const int H_GROUP_NAME = 80;
37 static const int X_GAP = 16;
38 static const int SEARCH_FONT_SIZE = 50;
39 static const Tizen::Graphics::Color COLOR_GROUP_NAME_BG (127, 127, 127);
40 static const Tizen::Graphics::Color COLOR_GROUP_TEXT (255, 255, 255);
42 SearchForm::SearchForm(void)
43 : __pSearchTableView(null)
45 , __pNoContentTextLabel(null)
47 , __itemHeight(ITEM_HEIGHT_MAIN_TEXT_NORMAL)
48 , __fontSize(FONT_MAIN_TEXT_SIZE_NORMAL)
54 SearchForm::~SearchForm(void)
61 SearchForm::Initialize(void)
65 Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER);
72 SearchForm::OnInitializing(void)
75 GetHeader()->SetTitleText(ResourceManager::GetString("IDS_COM_BODY_SEARCH"));
77 __pSearchBar = new (std::nothrow) SearchBar();
78 __pSearchBar->Construct(Rectangle(0, 0, GetClientAreaBounds().width, H_SEARCH_BAR));
79 __pSearchBar->SetGuideText(ResourceManager::GetString("IDS_COM_BODY_SEARCH"));
80 __pSearchBar->AddSearchBarEventListener(*this);
81 __pSearchBar->AddTextEventListener(*this);
82 __pSearchBar->AddKeypadEventListener(*this);
83 // __pSearchBar->SetLowerCaseModeEnabled(true);
85 __pSearchTableView = new (std::nothrow) TableView();
86 __pSearchTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight()),
88 TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
90 __pSearchTableView->SetItemProvider(this);
91 __pSearchTableView->AddTableViewItemEventListener(*this);
92 __pSearchTableView->AddTouchEventListener(*this);
93 __pSearchTableView->AddScrollEventListener(*this);
94 __pSearchBar->SetContent(__pSearchTableView);
96 __fontSizeValue = CommonUtil::GetFontSizeValue();
97 __itemHeight = CommonUtil::GetItemHeight(__fontSizeValue);
98 __fontSize = CommonUtil::GetFontSize(__fontSizeValue);
100 if (GetFooter() != null)
102 GetFooter()->SetBackButton();
105 SetFormBackEventListener(this);
107 AddControl(__pSearchBar);
109 __pPresentationModel = SearchPresentationModel::GetInstance();
116 SearchForm::OnTerminating(void)
118 AppLogDebug("ENTER");
119 __pSearchTableView->Destroy();
125 SearchForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source,
126 Tizen::Ui::Controls::SearchBarMode mode)
128 AppLogDebug("ENTER");
129 __pPresentationModel->RemoveSearchResult();
131 if (__pSearchTableView != null)
133 __pSearchTableView->UpdateTableView();
134 __pSearchTableView->ScrollToItem(INIT_VALUE);
135 __pSearchTableView->Invalidate(true);
141 SearchForm::OnSearchBarContentAreaResized(Tizen::Ui::Controls::SearchBar& source,
144 AppLogDebug("ENTER");
149 SearchForm::OnTextValueChanged(const Tizen::Ui::Control& source)
151 AppLogDebug("ENTER");
152 if (__pSearchBar->GetText().GetLength() != INIT_VALUE)
154 __pPresentationModel->InitializeContentList(__pSearchBar->GetText());
158 __pPresentationModel->RemoveSearchResult();
161 if (__pSearchTableView != null)
163 __pSearchTableView->UpdateTableView();
164 __pSearchTableView->ScrollToItem(INIT_VALUE);
165 __pSearchTableView->Invalidate(true);
171 SearchForm::OnTextValueChangeCanceled(const Tizen::Ui::Control& source)
173 AppLogDebug("ENTER");
178 SearchForm::OnKeypadActionPerformed(Tizen::Ui::Control& source,
179 Tizen::Ui::KeypadAction keypadAction)
181 AppLogDebug("ENTER");
182 if (keypadAction == KEYPAD_ACTION_SEARCH)
184 __pSearchBar->HideKeypad();
186 if (__pSearchBar->GetTextLength() != INIT_VALUE)
188 __pPresentationModel->InitializeContentList(__pSearchBar->GetText());
192 __pPresentationModel->RemoveSearchResult();
194 if (__pSearchTableView != null)
196 __pSearchTableView->UpdateTableView();
197 __pSearchTableView->ScrollToItem(INIT_VALUE);
198 __pSearchTableView->Invalidate(true);
205 SearchForm::OnKeypadClosed(Tizen::Ui::Control& source)
207 AppLogDebug("ENTER");
208 if (GetFooter() != null)
210 GetFooter()->SetShowState(true);
213 Rectangle clientBounds = GetClientAreaBounds();
214 __pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
216 if (__pNoContentTextLabel != null)
218 __pNoContentTextLabel->SetBounds(X_GAP,(clientBounds.height - H_NO_CONTENT)/2,GetWidth() - (X_GAP * 2),H_NO_CONTENT);
224 SearchForm::OnKeypadOpened(Tizen::Ui::Control& source)
226 AppLogDebug("ENTER");
227 Rectangle clientBounds = GetClientAreaBounds();
228 __pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
230 if (__pNoContentTextLabel != null)
232 //Rectangle(X_GAP, Y_GAP_NO_CONTENT, GetWidth() - (X_GAP * 2), H_NO_CONTENT)
233 __pNoContentTextLabel->SetBounds(Rectangle(X_GAP,(clientBounds.height - H_NO_CONTENT)/2,GetWidth() - (X_GAP * 2),H_NO_CONTENT));
239 SearchForm::OnKeypadWillOpen(Tizen::Ui::Control &source)
241 AppLogDebug("ENTER");
242 // GetFooter()->SetShowState(false);
247 SearchForm::OnKeypadBoundsChanged(Tizen::Ui::Control& source)
249 Rectangle clientBounds = GetClientAreaBounds();
250 __pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
252 if (__pNoContentTextLabel != null && __pNoContentTextLabel->GetShowState())
254 //Rectangle(X_GAP, Y_GAP_NO_CONTENT, GetWidth() - (X_GAP * 2), H_NO_CONTENT)
255 __pNoContentTextLabel->SetBounds(Rectangle(X_GAP,(clientBounds.height - H_NO_CONTENT)/2,GetWidth() - (X_GAP * 2),H_NO_CONTENT));
260 SearchForm::GetItemCount(void)
262 AppLogDebug("ENTER");
263 int contentCount = __pPresentationModel->GetTotalContentCount();
265 if ( __pNoContentTextLabel != null)
267 if (contentCount == 0)
269 __pNoContentTextLabel->SetShowState(true);
273 __pNoContentTextLabel->SetShowState(false);
282 Tizen::Ui::Controls::TableViewItem*
283 SearchForm::CreateItem(const int itemIndex, int itemWidth)
285 AppLogDebug("ENTER");
286 Label* pDividerLabel;
287 bool addDivider = true;
288 RelativeLayout layout;
290 int artistIndex = __pPresentationModel->GetArtistIndex();
291 int albumIndex = __pPresentationModel->GetAlbumIndex();
292 int songIndex = __pPresentationModel->GetSongIndex();
294 ContentInformation* pContentInfo = null;
295 TableViewItem* pItem = new (std::nothrow) TableViewItem();
297 result r = pItem->Construct(layout, Dimension(itemWidth, H_GROUP_NAME), TABLE_VIEW_ANNEX_STYLE_NORMAL);
298 TryCatch(r == E_SUCCESS, delete pItem, "pItem->Construct(%s)", GetErrorMessage(r));
300 if (artistIndex == itemIndex)
302 r = CreateGroupNameTableViewItem(*pItem, ResourceManager::GetString(L"IDS_MUSIC_TAB4_ARTISTS"));
303 TryCatch(r == E_SUCCESS, delete pItem, "CreateTableViewItem failed(%s)", GetErrorMessage(r));
308 else if (albumIndex == itemIndex)
310 r = CreateGroupNameTableViewItem(*pItem, ResourceManager::GetString(L"IDS_MUSIC_BODY_ALBUMS"));
311 TryCatch(r == E_SUCCESS, delete pItem, "CreateTableViewItem failed(%s)", GetErrorMessage(r));
316 else if (songIndex == itemIndex)
318 r = CreateGroupNameTableViewItem(*pItem, ResourceManager::GetString(L"IDS_MUSIC_HEADER_SONGS"));
319 TryCatch(r == E_SUCCESS, delete pItem, "CreateTableViewItem failed(%s)", GetErrorMessage(r));
329 pItem = new (std::nothrow) TableViewItem();
330 r = pItem->Construct(Dimension(itemWidth, __itemHeight), TABLE_VIEW_ANNEX_STYLE_NORMAL);
331 TryCatch(r == E_SUCCESS, delete pItem, "pItem->Construct(%s)", GetErrorMessage(r));
333 pContentInfo = __pPresentationModel->GetContentInfoN(itemIndex);
334 TryCatch(pContentInfo != null, delete pItem, "pContentInfo is null", GetErrorMessage(GetLastResult()));
336 if (artistIndex != -1 && itemIndex > artistIndex)
338 bool addArtist = true;
340 if(albumIndex != -1 && itemIndex > albumIndex)
345 if(songIndex != -1 && albumIndex == -1 && itemIndex > songIndex)
352 Label* pArtistNameLabel = new (std::nothrow) Label();
353 pArtistNameLabel->Construct(Rectangle(X_GAP_THUMBNAIL, 0, W_CLIENT_AREA - X_GAP_THUMBNAIL, __itemHeight), pContentInfo->ArtistName);
354 pArtistNameLabel->SetTextColor(COLOR_MAIN_TEXT);
355 pArtistNameLabel->SetTextConfig((__fontSize - 8), LABEL_TEXT_STYLE_NORMAL);
356 pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
357 pArtistNameLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
358 pItem->AddControl(pArtistNameLabel);
360 if (itemIndex == __pPresentationModel->GetAlbumIndex()-1 || itemIndex == __pPresentationModel->GetTotalContentCount()-1)
367 if(albumIndex != -1 && itemIndex > albumIndex)
369 bool addAlbum = true;
370 if(songIndex != -1 && itemIndex > songIndex)
377 Label* pAlbumNameLabel = new (std::nothrow) Label();
378 pAlbumNameLabel->Construct(Rectangle(X_GAP_THUMBNAIL, 0, W_CLIENT_AREA - X_GAP_THUMBNAIL, __itemHeight / 2), pContentInfo->AlbumName);
379 pAlbumNameLabel->SetTextColor(COLOR_MAIN_TEXT);
380 pAlbumNameLabel->SetTextConfig(__fontSize - 8 , LABEL_TEXT_STYLE_NORMAL);
381 pAlbumNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
382 pAlbumNameLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
384 Label* pArtistNameLabel = new (std::nothrow) Label();
385 pArtistNameLabel->Construct(Rectangle(X_GAP_THUMBNAIL, pAlbumNameLabel->GetHeight(), W_CLIENT_AREA - X_GAP_THUMBNAIL, __itemHeight / 2), pContentInfo->ArtistName);
386 pArtistNameLabel->SetTextColor(COLOR_SUB_TEXT);
387 pArtistNameLabel->SetTextConfig(__fontSize - 8, LABEL_TEXT_STYLE_NORMAL);
388 pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
390 pItem->AddControl(pAlbumNameLabel);
391 pItem->AddControl(pArtistNameLabel);
393 if (itemIndex == __pPresentationModel->GetSongIndex()-1 || itemIndex == __pPresentationModel->GetTotalContentCount()-1)
399 if(songIndex != -1 && itemIndex > songIndex)
401 Label* pSongNameLabel = new (std::nothrow) Label();
402 pSongNameLabel->Construct(Rectangle(X_GAP_THUMBNAIL, 0, W_CLIENT_AREA - X_GAP_THUMBNAIL, __itemHeight), pContentInfo->TitleName);
403 pSongNameLabel->SetTextColor(COLOR_MAIN_TEXT);
404 pSongNameLabel->SetTextConfig(__fontSize - 8, LABEL_TEXT_STYLE_NORMAL);
405 pSongNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
407 pItem->AddControl(pSongNameLabel);
409 if (itemIndex == __pPresentationModel->GetTotalContentCount()-1 || itemIndex == __pPresentationModel->GetTotalContentCount()-1)
418 pDividerLabel = new (std::nothrow) Label();
419 pDividerLabel->Construct(FloatRectangle(0, __itemHeight-SEARCH_ITEM_DIVIDER_HEIGHT, W_CLIENT_AREA,SEARCH_ITEM_DIVIDER_HEIGHT ), L"");
420 pDividerLabel->SetBackgroundColor(__pSearchTableView->GetItemDividerColor());
421 pItem->AddControl(pDividerLabel);
428 AppLogDebug("EXIT(%ls)", GetErrorMessage(GetLastResult()));
433 SearchForm::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
435 AppLogDebug("ENTER");
444 SearchForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
446 AppLogDebug("ENTER");
451 SearchForm::GetDefaultItemHeight(void)
453 AppLogDebug("ENTER");
459 SearchForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
461 Tizen::Ui::Controls::TableViewItem* pItem,
462 Tizen::Ui::Controls::TableViewItemStatus status)
464 AppLogDebug("ENTER");
465 if (status != TABLE_VIEW_ITEM_STATUS_SELECTED)
470 if (itemIndex == __pPresentationModel->GetArtistIndex()
471 || itemIndex == __pPresentationModel->GetAlbumIndex()
472 || itemIndex == __pPresentationModel->GetSongIndex())
474 __pSearchBar->HideKeypad();
479 int albumIndex = __pPresentationModel->GetAlbumIndex();
480 int songIndex = __pPresentationModel->GetSongIndex();
482 ContentInformation* pContentInfo;
483 SceneManager* pSceneManager = SceneManager::GetInstance();
484 AppAssert(pSceneManager);
486 if (songIndex != -1 && itemIndex > songIndex) //song result
488 pContentInfo = __pPresentationModel->GetContentInfoN(itemIndex);
489 ArrayList* pPath = new (std::nothrow) ArrayList();
491 pPath->Add(*(new (std::nothrow) String(pContentInfo->ContentFilePath)));
493 ArrayList* pData = new (std::nothrow) ArrayList();
495 pData->Add(*(new (std::nothrow) String(MUSIC)));
496 pData->Add(*(new (std::nothrow) Integer(0)));
497 pData->Add(*(pPath));
499 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), pData);
501 else if (albumIndex != -1 && itemIndex > albumIndex)//album item
503 pContentInfo = __pPresentationModel->GetContentInfoN(itemIndex);
505 ArrayList* pData = new (std::nothrow) ArrayList();
507 pData->Add(*(new (std::nothrow) String(IDSCN_SEARCH)));
508 pData->Add(*(new (std::nothrow) String(pContentInfo->AlbumName)));
509 pData->Add(*(new (std::nothrow) Integer(itemIndex)));
511 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_CONTENT_LIST), pData);
515 pContentInfo = __pPresentationModel->GetContentInfoN(itemIndex);
517 ArrayList* pData = new (std::nothrow) ArrayList();
519 pData->Add(*(new (std::nothrow) String(IDSCN_ARTIST_LIST)));
520 pData->Add(*(new (std::nothrow) String(pContentInfo->ArtistName)));
522 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ARTIST_CONTENT_LIST), pData);
531 SearchForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
533 Tizen::Ui::Controls::TableViewContextItem* pContextItem,
536 AppLogDebug("ENTER");
541 SearchForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
545 AppLogDebug("ENTER");
550 SearchForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
551 const Tizen::Ui::Scenes::SceneId& currentSceneId,
552 Tizen::Base::Collection::IList* pArgs)
554 AppLogDebug("ENTER");
555 if (__pSceneId == null)
557 __pSceneId = new (std::nothrow) String(previousSceneId);
560 if (__pPresentationModel->GetTotalContentCount() == 0)
562 if (__pNoContentTextLabel == null)
564 Rectangle clientBounds = GetClientAreaBounds();
565 __pNoContentTextLabel = new (std::nothrow) Label();
566 __pNoContentTextLabel->Construct(Rectangle(X_GAP,(clientBounds.height - H_NO_CONTENT)/2,GetWidth() - (X_GAP * 2),H_NO_CONTENT),ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
567 __pNoContentTextLabel->SetTextConfig(SEARCH_FONT_SIZE, LABEL_TEXT_STYLE_BOLD);
568 AddControl(__pNoContentTextLabel);
572 __pNoContentTextLabel->SetBounds(Rectangle(X_GAP,(GetClientAreaBounds().height - H_NO_CONTENT)/2,GetWidth() - (X_GAP * 2),H_NO_CONTENT));
573 __pNoContentTextLabel->SetShowState(true);
578 pArgs->RemoveAll(true);
582 if (__pSearchBar->GetMode() != SEARCH_BAR_MODE_INPUT)
584 __pSearchBar->SetMode(SEARCH_BAR_MODE_INPUT);
591 if (__pNoContentTextLabel->GetShowState() == false)
594 __pNoContentTextLabel->SetShowState(false);
599 pArgs->RemoveAll(true);
606 SearchForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
607 const Tizen::Ui::Scenes::SceneId& nextSceneId)
609 AppLogDebug("ENTER");
611 if (__pSearchBar != null)
613 __pSearchBar->HideKeypad();
616 // __pPresentationModel->RemoveSearchResult();
617 // __pSearchTableView->UpdateTableView();
619 // if (__pSearchBar->GetKeypadAction() == true)
621 // __pSearchBar->HideKeypad();
624 // __pSearchBar->RemoveSearchBarEventListener(*this);
625 // __pSearchBar->RemoveKeypadEventListener(*this);
627 // __pSearchTableView->RemoveTableViewItemEventListener(*this);
628 // __pSearchTableView->RemoveTouchEventListener(*this);
629 // __pSearchTableView->RemoveScrollEventListener(*this);
634 SearchForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
636 AppLogDebug("ENTER");
637 SceneManager* pSceneManager = SceneManager::GetInstance();
638 AppAssert(pSceneManager);
639 AppLogDebug("OnActionPerformed : %d", actionId);
644 SearchForm::CreateGroupNameTableViewItem(Tizen::Ui::Container& parent, const Tizen::Base::String& GroupName)
646 AppLogDebug("ENTER");
647 result r = E_SUCCESS;
649 Label* pGroupNameLabel = new (std::nothrow) Label();
650 pGroupNameLabel->Construct(Rectangle(0, 0, W_CLIENT_AREA, H_GROUP_NAME), L"");
651 pGroupNameLabel->SetBackgroundColor(COLOR_GROUP_NAME_BG);
652 pGroupNameLabel->SetTextColor(COLOR_GROUP_TEXT);
653 pGroupNameLabel->SetTextConfig(MAIN_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
654 pGroupNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
655 pGroupNameLabel->SetText(GroupName);
657 parent.AddControl(pGroupNameLabel);
664 SearchForm::MakeQuery(const Tizen::Base::String& WhereExpr, const Tizen::Base::String& SearchName)
666 AppLogDebug("ENTER");
667 if (WhereExpr == null || SearchName == null)
672 String StrMakeQuery = WhereExpr;
674 StrMakeQuery.Append(L" like '%");
675 StrMakeQuery.Append(SearchName);
676 StrMakeQuery.Append(L"%'");
678 AppLogDebug("MakeQuery : %ls", StrMakeQuery.GetPointer());
684 SearchForm::OnTouchDoublePressed (const Tizen::Ui::Control& source,
685 const Tizen::Graphics::Point& currentPosition,
686 const Tizen::Ui::TouchEventInfo& touchInfo)
688 AppLogDebug("ENTER");
693 SearchForm::OnTouchFocusIn (const Tizen::Ui::Control& source,
694 const Tizen::Graphics::Point& currentPosition,
695 const Tizen::Ui::TouchEventInfo& touchInfo)
697 AppLogDebug("ENTER");
702 SearchForm::OnTouchFocusOut (const Tizen::Ui::Control& source,
703 const Tizen::Graphics::Point& currentPosition,
704 const Tizen::Ui::TouchEventInfo& touchInfo)
706 AppLogDebug("ENTER");
711 SearchForm::OnTouchLongPressed (const Tizen::Ui::Control& source,
712 const Tizen::Graphics::Point& currentPosition,
713 const Tizen::Ui::TouchEventInfo& touchInfo)
715 AppLogDebug("ENTER");
720 SearchForm::OnTouchMoved (const Tizen::Ui::Control& source,
721 const Tizen::Graphics::Point& currentPosition,
722 const Tizen::Ui::TouchEventInfo& touchInfo)
724 AppLogDebug("ENTER");
729 SearchForm::OnTouchPressed (const Tizen::Ui::Control& source,
730 const Tizen::Graphics::Point& currentPosition,
731 const Tizen::Ui::TouchEventInfo& touchInfo)
733 AppLogDebug("ENTER");
738 SearchForm::OnTouchReleased (const Tizen::Ui::Control& source,
739 const Tizen::Graphics::Point& currentPosition,
740 const Tizen::Ui::TouchEventInfo& touchInfo)
742 AppLogDebug("ENTER");
747 SearchForm::OnScrollEndReached (Tizen::Ui::Control& source, Tizen::Ui::Controls::ScrollEndEvent type)
749 AppLogDebug( "ENTER");
750 AppLogDebug( "EXIT");
754 SearchForm::OnScrollPositionChanged (Tizen::Ui::Control& source, int scrollPos)
756 AppLogDebug( "ENTER");
757 AppLogDebug( "EXIT");
761 SearchForm::OnScrollStopped (Tizen::Ui::Control& source)
763 AppLogDebug( "ENTER");
764 AppLogDebug( "EXIT");
768 SearchForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
770 AppLogDebug("ENTER");
771 __pPresentationModel->RemoveSearchResult();
772 SceneManager* pSceneManager = SceneManager::GetInstance();
773 AppAssert(pSceneManager);
775 __pSearchTableView->SetItemProvider(static_cast<ITableViewItemProvider*>(null));
776 pSceneManager->GoForward(ForwardSceneTransition(__pSceneId->GetPointer(), SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY));
781 SearchForm::OnMusicContentUpdateCompleted(void)
783 AppLogDebug("ENTER");
784 if (__pSearchBar->GetText().GetLength() != INIT_VALUE)
786 __pPresentationModel->InitializeContentList(__pSearchBar->GetText());
790 __pPresentationModel->RemoveSearchResult();
793 if (__pSearchTableView != null)
795 __pSearchTableView->UpdateTableView();
796 __pSearchTableView->ScrollToItem(INIT_VALUE);
802 SearchForm::OnFontSizeChanged(void)
804 __fontSizeValue = CommonUtil::GetFontSizeValue();
805 __itemHeight = CommonUtil::GetItemHeight(__fontSizeValue);
806 __fontSize = CommonUtil::GetFontSize(__fontSizeValue);
807 __pSearchTableView->UpdateTableView();