__pSearchTableView = new (std::nothrow) TableView();
__pSearchTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight()),
- true,
+ false,
TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
__pSearchTableView->SetItemProvider(this);
if (keypadAction == KEYPAD_ACTION_SEARCH)
{
__pSearchBar->HideKeypad();
- if (__pSearchBar->GetText().GetLength() != INIT_VALUE)
+
+ if (__pSearchBar->GetTextLength() != INIT_VALUE)
{
__pPresentationModel->InitializeContentList(__pSearchBar->GetText());
}
GetFooter()->SetShowState(true);
Rectangle clientBounds = GetClientAreaBounds();
__pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
+
+ if (__pNoContentTextLabel != null && __pNoContentTextLabel->GetShowState())
+ {
+ __pNoContentTextLabel->SetBounds(X_GAP,(clientBounds.height - H_NO_CONTENT)/2,GetWidth() - (X_GAP * 2),H_NO_CONTENT);
+ }
AppLogDebug("EXIT");
}
AppLogDebug("ENTER");
Rectangle clientBounds = GetClientAreaBounds();
__pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
+
+ if (__pNoContentTextLabel != null && __pNoContentTextLabel->GetShowState())
+ {
+ //Rectangle(X_GAP, Y_GAP_NO_CONTENT, GetWidth() - (X_GAP * 2), H_NO_CONTENT)
+ __pNoContentTextLabel->SetBounds(Rectangle(X_GAP,(clientBounds.height - H_NO_CONTENT)/2,GetWidth() - (X_GAP * 2),H_NO_CONTENT));
+ }
AppLogDebug("EXIT");
}
{
Rectangle clientBounds = GetClientAreaBounds();
__pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
+
+ if (__pNoContentTextLabel != null && __pNoContentTextLabel->GetShowState())
+ {
+ //Rectangle(X_GAP, Y_GAP_NO_CONTENT, GetWidth() - (X_GAP * 2), H_NO_CONTENT)
+ __pNoContentTextLabel->SetBounds(Rectangle(X_GAP,(clientBounds.height - H_NO_CONTENT)/2,GetWidth() - (X_GAP * 2),H_NO_CONTENT));
+ }
}
int
SearchForm::CreateItem(const int itemIndex, int itemWidth)
{
AppLogDebug("ENTER");
+ Label* pDividerLabel;
+ bool addDivider = true;
RelativeLayout layout;
layout.Construct();
pArtistNameLabel->SetTextConfig(MAIN_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
pItem->AddControl(pArtistNameLabel);
+
+ if (itemIndex == __pPresentationModel->GetAlbumIndex()-1)
+ {
+ addDivider = false;
+ }
}
else if (itemIndex < __pPresentationModel->GetSongIndex())
{
pItem->AddControl(pAlbumNameLabel);
pItem->AddControl(pArtistNameLabel);
+
+ if (itemIndex == __pPresentationModel->GetSongIndex()-1)
+ {
+ addDivider = false;
+ }
}
else
{
pSongNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
pItem->AddControl(pSongNameLabel);
+
+ if (itemIndex == __pPresentationModel->GetTotalContentCount()-1)
+ {
+ addDivider = false;
+ }
}
delete pContentInfo;
+ if (addDivider)
+ {
+ pDividerLabel = new (std::nothrow) Label();
+ pDividerLabel->Construct(FloatRectangle(0, ITEM_HEIGHT-SEARCH_ITEM_DIVIDER_HEIGHT, W_CLIENT_AREA,SEARCH_ITEM_DIVIDER_HEIGHT ), L"");
+ pDividerLabel->SetBackgroundColor(__pSearchTableView->GetItemDividerColor());
+ pItem->AddControl(pDividerLabel);
+ }
+
AppLogDebug("EXIT");
return pItem;