__pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
SetFocus();
}
+ __pPresentationModel->InitializeContactList();
+ if (__pPresentationModel->GetContactCount() == 0)
+ {
+ __pSearchBar->SetShowState(false);
+ __pListView->SetShowState(false);
+ __pCheckLabel->SetShowState(false);
+ __pSelectAllButton->SetShowState(false);
+ __pEmptyImageLabel->SetShowState(true);
+ __pEmptyCommentLabel->SetShowState(true);
+ __pBottomLabel->SetShowState(false);
+ }
+ else
+ {
+ __pSearchBar->SetShowState(true);
+ __pListView->SetShowState(true);
+ __pCheckLabel->SetShowState(true);
+ __pSelectAllButton->SetShowState(true);
+ __pEmptyImageLabel->SetShowState(false);
+ __pEmptyCommentLabel->SetShowState(false);
+ __pBottomLabel->SetShowState(true);
+ }
+
__pSelectAllButton->SetSelected(false);
for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount(); groupIndex++)
}
}
}
-
UpdateBottomLabel();
- __pPresentationModel->InitializeContactList();
__pListView->SetFastScrollIndex(__pPresentationModel->GetAllKeys(), false);
__pListView->UpdateList();
+ Invalidate(true);
}
void
static const int IDA_BUTTON_GALLERY = 10;
static const int IDA_BUTTON_TAKE_PHOTO = 11;
static const int IDA_BUTTON_REMOVE = 12;
+static const int IDA_BUTTON_RINGTONE_CLEAR = 13;
static const wchar_t* IDB_ICON_ADD_NORMAL = L"C02_caller_id_icon_add.png";
static const wchar_t* IDB_ICON_ADD_PRESSED = L"C02_caller_id_icon_add_press.png";
static const wchar_t* IDB_ICON_REMOVE_PRESSED = L"00_button_expand_minus_press.png";
static const wchar_t* IDB_REMOVE_BG_NORMAL = L"00_circle_button_delete.png";
static const wchar_t* IDB_REMOVE_BG_PRESSED = L"00_circle_button_delete_press.png";
+static const wchar_t* IDB_DETAILS_RESET_NORMAL = L"00_button_refresh.png";
+static const wchar_t* IDB_DETAILS_RESET_PRESSED = L"00_button_refresh_press.png";
static const int H_ITEM = 128;
static const int H_THUMBNAIL = 360;
static const int H_ICON_BUTTON = 74;
static const int Y_REMOVE_BUTTON = 26;
static const int X_REMOVE_BUTTON_MARGIN = 40;
+static const int X_REFRESH_BUTTON_MARGIN = 88;
static const int X_RINGTONE_TEXT = 3;
static const int Y_RINGTONE_TITLE = 10;
__pTableView->RefreshItem(1, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
}
break;
+ case IDA_BUTTON_RINGTONE_CLEAR:
+ {
+ __pPresentationModel->SetRingtone(String());
+ __pTableView->RefreshItem(2, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ break;
default:
break;
}
TableViewItem* pItem = new (std::nothrow) TableViewItem();
pItem->Construct(Dimension(itemWidth, itemHeight), TABLE_VIEW_ANNEX_STYLE_NORMAL);
- pItem->SetBackgroundColor(COLOR_TABLE_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
- pItem->SetBackgroundColor(COLOR_TABLE_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
if (itemIndex == 0)
{
{
pButtonAdd->SetShowState(false);
}
+ pItem->SetBackgroundColor(COLOR_TABLE_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(COLOR_TABLE_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
}
else if (itemIndex == 1)
{
pEditField->SetText(categoryName);
}
pItem->AddControl(pEditField);
+ pItem->SetBackgroundColor(COLOR_THUMBNAIL, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(COLOR_THUMBNAIL, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
}
else if (itemIndex == 2)
{
pContentLabel->SetTextColor(Color(COLOR_RINGTONE));
pContentLabel->SetTextConfig(FONT_SIZE_RINGTONE, LABEL_TEXT_STYLE_BOLD);
pItem->AddControl(pContentLabel);
+
+ Button* pClearButton = new (std::nothrow) Button();
+ pClearButton->Construct(Rectangle(itemWidth - X_REFRESH_BUTTON_MARGIN, (pItem->GetHeight() - H_ICON_BUTTON) / 2, H_ICON_BUTTON, H_ICON_BUTTON));
+ pClearButton->SetActionId(IDA_BUTTON_RINGTONE_CLEAR);
+ pClearButton->AddActionEventListener(*this);
+
+ Bitmap* pReset = ResourceManager::GetBitmapN(IDB_DETAILS_RESET_NORMAL);
+ if (pReset != null)
+ {
+ pClearButton->SetNormalBitmap(Point(0, 0), *pReset);
+ delete pReset;
+ }
+ pReset = ResourceManager::GetBitmapN(IDB_DETAILS_RESET_PRESSED);
+ if (pReset != null)
+ {
+ pClearButton->SetPressedBitmap(Point(0, 0), *pReset);
+ delete pReset;
+ }
+
+ pItem->AddControl(pClearButton);
+ pItem->SetIndividualSelectionEnabled(pClearButton, true);
+
+ pItem->SetBackgroundColor(COLOR_THUMBNAIL, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(COLOR_THUMBNAIL, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
}
return pItem;