static const int W_SAVE_CONTACT_BUTTON = 318;
static const int W_POPUP_ITEM_GAP = 20;
static const int X_REFRESH_BUTTON_MARGIN = 88;
+static const int Y_EDIT_FIELD_GAP = 5;
+static const int H_EDIT_FIELD_GAP = 10;
static const int FONT_SIZE_SAVE_CONTACT_CONFIRM = 42;
static const int FONT_SIZE_SAVE_CONTACT_BUTTON = 36;
{
groupItemHeight = H_NAMEFIELD_GROUP_ITEM_HEIGHT;
}
- else if (groupIndex == TABLE_VIEW_NOTE_FIELD_INDEX || groupIndex == TABLE_VIEW_BIRTHDAY_FIELD_INDEX)
+ else if (groupIndex == TABLE_VIEW_BIRTHDAY_FIELD_INDEX)
{
- groupItemHeight = 2;
+ groupItemHeight = Y_EDIT_FIELD_GAP;
+ }
+ else if (groupIndex == TABLE_VIEW_NOTE_FIELD_INDEX)
+ {
+ groupItemHeight = H_EDIT_FIELD_GAP;
}
else if ((groupIndex > TABLE_VIEW_PHONE_NUMBER_FIELD_INDEX && groupIndex < TABLE_VIEW_GROUP_RINGTONE_FIELD_INDEX) || groupIndex == TABLE_VIEW_MORE_INFORMATION_FIELD_INDEX)
{
item.SetSize(itemWidth, itemHeight);
- Rectangle itemBounds(W_ITEM_GAP, 0, itemWidth - (W_ITEM_GAP * 3) - H_BUTTON, H_ITEM);
+ Rectangle itemBounds(W_ITEM_GAP, Y_EDIT_FIELD_GAP, itemWidth - (W_ITEM_GAP * 3) - H_BUTTON, H_ITEM - H_EDIT_FIELD_GAP);
if (__isExpandable == true)
{
item.AddControl(pFirstName);
- itemBounds.y += pFirstName->GetHeight();
+ itemBounds.y += H_ITEM;
EditField* pMiddleName = new (std::nothrow) EditField();
pMiddleName->Construct(itemBounds, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);
pMiddleName->SetGuideText(ResourceManager::GetString(L"IDS_PB_BODY_MIDDLE_NAME"));
item.AddControl(pMiddleName);
- itemBounds.y += pMiddleName->GetHeight();
+ itemBounds.y += H_ITEM;
EditField* pLastName = new (std::nothrow) EditField();
pLastName->Construct(itemBounds, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY, false, __pPresentationModel->GetValue(DETAIL_PROPERTY_LAST_NAME).GetLength() + EDIT_FIELD_EXTENDED_LENGTH);
pLastName->SetGuideText(ResourceManager::GetString(L"IDS_PB_BODY_LAST_NAME"));
item.AddControl(pLastName);
- itemBounds.y += pLastName->GetHeight();
+ itemBounds.y += H_ITEM;
EditField* pSuffix = new (std::nothrow) EditField();
pSuffix->Construct(itemBounds, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);
pSuffix->SetGuideText(ResourceManager::GetString(L"IDS_PB_BODY_SUFFIX"));
item.AddControl(pSuffix);
- itemBounds.y += pSuffix->GetHeight();
+ itemBounds.y += H_ITEM;
EditField* pNickName = new (std::nothrow) EditField();
pNickName->Construct(itemBounds, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);
pNickName->SetGuideText(ResourceManager::GetString(L"IDS_PB_BODY_NICKNAME"));
item.AddControl(pNickName);
- itemBounds.y += pNickName->GetHeight();
+ itemBounds.y += H_ITEM;
if (__isJobTitleEnabled == true)
{
EditField* pJobTitle = new (std::nothrow) EditField();
item.AddControl(pJobTitle);
- itemBounds.y += pJobTitle->GetHeight();
+ itemBounds.y += H_ITEM;
}
if (__isDepartmentEnabled == true)
item.AddControl(pDepartment);
- itemBounds.y += pDepartment->GetHeight();
+ itemBounds.y += H_ITEM;
}
EditField* pCompanyName = new (std::nothrow) EditField();
pTableViewItem->SetBackgroundColor(Color(0), TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
EditField* pInputField = new (std::nothrow) EditField();
- pInputField->Construct(Rectangle(W_ITEM_GAP, 0, itemWidth - (W_ITEM_GAP * 4) - H_BUTTON - W_TYPE_BUTTON, H_ITEM), style, INPUT_STYLE_OVERLAY);
+ pInputField->Construct(Rectangle(W_ITEM_GAP, Y_EDIT_FIELD_GAP, itemWidth - (W_ITEM_GAP * 4) - H_BUTTON - W_TYPE_BUTTON, H_ITEM - H_EDIT_FIELD_GAP), style, INPUT_STYLE_OVERLAY);
pInputField->SetGuideText(guideText);
pInputField->SetText(text);
pInputField->AddKeypadEventListener(*this);
__pNoteFieldItem->AddControl(pNoteTitle);
ExpandableEditArea* pNoteEditArea = new (std::nothrow) ExpandableEditArea();
- pNoteEditArea->Construct(Rectangle(0, H_LABEL, itemWidth, H_DOUBLE_LINE_ITEM - H_LABEL), EXPANDABLE_EDIT_AREA_STYLE_NORMAL, EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE);
+ pNoteEditArea->Construct(Rectangle(Y_EDIT_FIELD_GAP, H_LABEL, itemWidth - H_EDIT_FIELD_GAP, H_DOUBLE_LINE_ITEM - H_LABEL - H_EDIT_FIELD_GAP), EXPANDABLE_EDIT_AREA_STYLE_NORMAL, EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE);
pNoteEditArea->SetTitleText(ResourceManager::GetString(L"IDS_PB_BODY_NOTE"));
pNoteEditArea->SetText(__pPresentationModel->GetValue(DETAIL_PROPERTY_NOTE));
pNoteEditArea->AddExpandableEditAreaEventListener(*this);
int itemWidth = GetBounds().width;
pLabelThumbnail = new (std::nothrow) Label();
- pLabelThumbnail->Construct(Rectangle((itemWidth - W_THUMBNAIL) / 2, 0, W_THUMBNAIL, W_THUMBNAIL), L"");
+ pLabelThumbnail->Construct(Rectangle((itemWidth - W_THUMBNAIL) / 2, Y_EDIT_FIELD_GAP, W_THUMBNAIL, W_THUMBNAIL - H_EDIT_FIELD_GAP), L"");
item.AddControl(pLabelThumbnail);
AddControl(__pSearchBar);
__pSearchListView = new (std::nothrow) GroupedListView();
- __pSearchListView->Construct(Rectangle(0, H_SEARCHBAR, clientBounds.width, clientBounds.height - H_SEARCHBAR - H_BOTTOM_LABEL), GROUPED_LIST_VIEW_STYLE_INDEXED, true, false);
+ __pSearchListView->Construct(Rectangle(0, H_SEARCHBAR, clientBounds.width, clientBounds.height - H_SEARCHBAR), GROUPED_LIST_VIEW_STYLE_INDEXED, true, false);
__pSearchListView->SetItemProvider(*__pSearchListEvent);
__pSearchListView->AddGroupedListViewItemEventListener(*this);
__pSearchListView->AddTouchEventListener(*this);
if (selectedCount > 0)
{
__pBottomLabel->SetShowState(true);
- __pListView->SetSize(__pListView->GetSize().width, pForm->GetClientAreaBounds().height - H_SEARCHBAR - H_SELECT_ALL - H_BOTTOM_LABEL);
- __pSearchListView->SetSize(__pSearchListView->GetSize().width, pForm->GetClientAreaBounds().height - H_SELECT_ALL - H_BOTTOM_LABEL);
+ __pListView->SetSize(__pListView->GetSize().width, pForm->GetClientAreaBounds().height - __pSearchBar->GetHeight() - __pSelectAll->GetHeight() - H_BOTTOM_LABEL);
+ __pSearchListView->SetSize(__pSearchListView->GetSize().width, pForm->GetClientAreaBounds().height - __pSearchBar->GetHeight());
pFooter->SetItemEnabled(0, true);
}
else
{
__pBottomLabel->SetShowState(false);
- __pListView->SetSize(__pListView->GetSize().width, pForm->GetClientAreaBounds().height - H_SEARCHBAR - H_SELECT_ALL);
- __pSearchListView->SetSize(__pSearchListView->GetSize().width, pForm->GetClientAreaBounds().height - H_SELECT_ALL);
+ __pListView->SetSize(__pListView->GetSize().width, pForm->GetClientAreaBounds().height - __pSearchBar->GetHeight() - __pSelectAll->GetHeight());
+ __pSearchListView->SetSize(__pSearchListView->GetSize().width, pForm->GetClientAreaBounds().height - __pSearchBar->GetHeight());
pFooter->SetItemEnabled(0, false);
}