#include <FApp.h>
#include <FBase.h>
+#include <FIo.h>
#include <FUi.h>
+#include <FSystem.h>
#include "CtIContactEventListener.h"
#include "CtIContactsAppStateChangeEventListener.h"
#include "CtTypes.h"
class ContactEditorForm
: public Tizen::Ui::Controls::Form
, public Tizen::App::IAppControlResponseListener
+ , public Tizen::Io::IFileEventListener
, public Tizen::Ui::IActionEventListener
, public Tizen::Ui::IDateChangeEventListener
, public Tizen::Ui::IFocusEventListener
, public Tizen::Ui::Controls::IGroupedTableViewItemProvider
, public Tizen::Ui::Controls::IScrollEventListener
, public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::System::IDeviceEventListener
, public IContactEventListener
, public IContactsAppStateChangeEventListener
{
virtual void OnForeground(void);
virtual void OnBackground(void);
+ virtual void OnFileEventOccured(const unsigned long events, const Tizen::Base::String &path, const unsigned int eventId);
+
+ virtual void OnDeviceStateChanged(Tizen::System::DeviceType deviceType, const Tizen::Base::String &state);
+
private:
Tizen::Ui::Controls::TableViewItem* GetThumbnailField(int itemWidth);
Tizen::Ui::Controls::TableViewItem* GetNameFields(int itemWidth);
Tizen::Base::Collection::ArrayList* __pAddressFieldItem;
Tizen::Base::Collection::ArrayList* __pImAddressFieldItem;
Tizen::Base::Collection::ArrayList* __pUrlFieldItem;
+ Tizen::Io::FileEventManager* __pFileEventManager;
Tizen::Ui::Control* __pCurrentFocusedItem;
Tizen::Ui::Controls::ContextMenu* __pDefaultPhoneNumberContextMenu;
Tizen::Ui::Controls::ContextMenu* __pMoreInformationContextMenu;
static const wchar_t* FAVORITE_LABEL = L"FavoriteLabel";
-static const int Y_THUMBNAIL = 50;
+static const int Y_THUMBNAIL = 34;
static const int H_THUMBNAIL = 360;
static const int X_MAIN_INFO = 26;
static const int H_NAME = 60;
static const int X_QUICK_BUTTON = 148;
#endif
static const int H_QUICK_BUTTON = 138;
-static const int H_FAVORITE = 38;
-static const int W_FAVORITE_GAP = 16;
+static const int H_FAVORITE = 50;
+static const int W_FAVORITE_GAP = 26;
static const int H_IM_TITLE = 46;
static const int W_GROUP_STYLE_MARGIN = 16;
static const unsigned int COLOR_ITEM_TITLE = Color32<128, 128, 128>::Value;
static const unsigned int COLOR_ITEM_VALUE = Color32<0, 0, 0>::Value;
static const unsigned int COLOR_ITEM_TYPE = Color32<59, 115, 182>::Value;
-static const unsigned int COLOR_OTHER_NUMBER = Color32<87, 85, 80>::Value;
+static const unsigned int COLOR_OTHER_NUMBER = Color32<0, 0, 0>::Value;
static const unsigned int COLOR_NAME = Color32<59, 115, 182>::Value;
static const unsigned int COLOR_GROUP_STYLE = Color32<240, 237, 232>::Value;
-static const int FONT_SIZE_NAME = 53;
+static const int FONT_SIZE_NAME = 56;
static const int FONT_SIZE_SUB_INFO = 32;
static const int FONT_SIZE_MAIN_TEXT = 44;
static const int FONT_SIZE_SUB_TEXT = 32;
pValueLabel->Construct(Rectangle(W_TEXT_MARGIN, 0, itemWidth - W_TEXT_MARGIN * 2 - W_TYPE, H_ITEM), value);
pValueLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
pValueLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
- pValueLabel->SetTextConfig(FONT_SIZE_MAIN_TEXT, LABEL_TEXT_STYLE_BOLD);
+ pValueLabel->SetTextConfig(FONT_SIZE_MAIN_TEXT, LABEL_TEXT_STYLE_NORMAL);
pValueLabel->SetTextColor(COLOR_OTHER_NUMBER);
pItem->AddControl(*pValueLabel);
using namespace Tizen::Base::Collection;
using namespace Tizen::Base::Utility;
using namespace Tizen::Graphics;
+using namespace Tizen::Io;
using namespace Tizen::Media;
using namespace Tizen::Ui;
using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Scenes;
using namespace Tizen::Social;
+using namespace Tizen::System;
static const int IDA_ACTION_BAR_SAVE = 11;
static const int IDA_BUTTON_THUMBNAIL_ADD = 21;
static const wchar_t* INPUT_SELECTION_TYPE_SINGLE = L"single";
static const wchar_t* CHARACTER_AT = L"@";
static const wchar_t* CHARACTER_DOT = L".";
+static const wchar_t* SD_CARD_UNMOUNTED = L"Unmounted";
static const int H_ITEM = 128;
static const int H_DESCRIPTION_CONTAINER = 136;
, __pAddressFieldItem(null)
, __pImAddressFieldItem(null)
, __pUrlFieldItem(null)
+, __pFileEventManager(null)
, __pCurrentFocusedItem(null)
, __pDefaultPhoneNumberContextMenu(null)
, __pMoreInformationContextMenu(null)
__pPresentationModel->Construct();
__pPresentationModel->AddContactChangeListener(*this);
+ DeviceManager::AddDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
+
return E_SUCCESS;
}
delete __pMoreInformationContextMenu;
delete __pThumbnailContextMenu;
delete __pTypeContextMenu;
+ delete __pFileEventManager;
+
+ DeviceManager::RemoveDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
return r;
}
int selectedItemIndex = (actionId & TABLE_VIEW_INPUT_FIELD_INDEX_MASK) >> TABLE_VIEW_INPUT_FIELD_INDEX_SHIFT;
TableViewItem* pItem = static_cast<TableViewItem *>(__pPhoneNumberFieldItem->GetAt(itemIndex));
+ if (pItem == null)
+ {
+ return;
+ }
pItem->SetName(Integer::ToString(selectedItemIndex));
Button* pButtonType = static_cast<Button *>(pItem->GetControl(1));
int selectedItemIndex = (actionId & TABLE_VIEW_INPUT_FIELD_INDEX_MASK) >> TABLE_VIEW_INPUT_FIELD_INDEX_SHIFT;
TableViewItem* pItem = static_cast<TableViewItem *>(__pEmailFieldItem->GetAt(itemIndex));
+ if (pItem == null)
+ {
+ return;
+ }
pItem->SetName(Integer::ToString(selectedItemIndex));
Button* pButtonType = static_cast<Button *>(pItem->GetControl(1));
int selectedItemIndex = (actionId & TABLE_VIEW_INPUT_FIELD_INDEX_MASK) >> TABLE_VIEW_INPUT_FIELD_INDEX_SHIFT;
TableViewItem* pItem = static_cast<TableViewItem *>(__pAddressFieldItem->GetAt(itemIndex));
+ if (pItem == null)
+ {
+ return;
+ }
pItem->SetName(Integer::ToString(selectedItemIndex));
Button* pButtonType = static_cast<Button *>(pItem->GetControl(1));
int selectedItemIndex = (actionId & TABLE_VIEW_INPUT_FIELD_INDEX_MASK) >> TABLE_VIEW_INPUT_FIELD_INDEX_SHIFT;
TableViewItem* pItem = static_cast<TableViewItem *>(__pImAddressFieldItem->GetAt(itemIndex));
+ if (pItem == null)
+ {
+ return;
+ }
pItem->SetName(Integer::ToString(selectedItemIndex));
Button* pButtonType = static_cast<Button *>(pItem->GetControl(1));
int selectedItemIndex = (actionId & TABLE_VIEW_INPUT_FIELD_INDEX_MASK) >> TABLE_VIEW_INPUT_FIELD_INDEX_SHIFT;
TableViewItem* pItem = static_cast<TableViewItem *>(__pUrlFieldItem->GetAt(itemIndex));
+ if (pItem == null)
+ {
+ return;
+ }
pItem->SetName(Integer::ToString(selectedItemIndex));
Button* pButtonType = static_cast<Button *>(pItem->GetControl(1));
{
__pPresentationModel->SetThumbnail(L"");
__pTableView->RefreshItem(TABLE_VIEW_THUMBNAIL_FIELD_INDEX, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+
+ delete __pFileEventManager;
+ __pFileEventManager = null;
}
break;
case IDA_BUTTON_CAMERA:
ChangeNameFieldStatus();
__pTableView->UpdateTableView();
+
+ Rectangle clientBounds = GetClientAreaBounds();
+ __pTableView->SetSize(clientBounds.width, clientBounds.height);
}
break;
case IDA_BUTTON_MORE_INFO:
__isExpandable = (__isExpandable == true) ? false : true;
- if (__pNameFieldItem == __pCurrentFocusedItem)
- {
- SetFocus();
- }
-
return r;
}
pDeleteButton->SetShowState(true);
__pTableView->UpdateTableView();
- __pTableView->SetSize(GetClientAreaBounds().width, GetClientAreaBounds().height);
+ pEditField->ShowKeypad();
}
void
__pPresentationModel->SetThumbnail(*pResultString);
__pTableView->RefreshItem(TABLE_VIEW_THUMBNAIL_FIELD_INDEX, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+
+ if (__pFileEventManager == null)
+ {
+ __pFileEventManager = new (std::nothrow) FileEventManager();
+ __pFileEventManager->Construct(*this);
+ }
+ __pFileEventManager->AddPath(*pResultString, FILE_EVENT_TYPE_DELETE | FILE_EVENT_TYPE_DELETE_SELF | FILE_EVENT_TYPE_MODIFY | FILE_EVENT_TYPE_MOVE_SELF);
}
else if (appId.Equals(String(PROVIDER_ID_GALLERY)) && operationId.Equals(String(OPERATION_ID_PICK)))
{
__pPresentationModel->SetThumbnail(*pResultString);
__pTableView->RefreshItem(TABLE_VIEW_THUMBNAIL_FIELD_INDEX, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+
+ if (__pFileEventManager == null)
+ {
+ __pFileEventManager = new (std::nothrow) FileEventManager();
+ __pFileEventManager->Construct(*this);
+ }
+ __pFileEventManager->AddPath(*pResultString, FILE_EVENT_TYPE_DELETE | FILE_EVENT_TYPE_DELETE_SELF | FILE_EVENT_TYPE_MODIFY | FILE_EVENT_TYPE_MOVE_SELF);
}
else if (appId.Equals(String(PROVIDER_ID_FILEMANAGER)) && operationId.Equals(String(OPERATION_ID_PICK)))
{
ContactEditorForm::OnBackground(void)
{
}
+
+void
+ContactEditorForm::OnFileEventOccured(const unsigned long events, const Tizen::Base::String &path, const unsigned int eventId)
+{
+ __pPresentationModel->SetThumbnail(path);
+ __pTableView->RefreshItem(TABLE_VIEW_THUMBNAIL_FIELD_INDEX, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+}
+
+void
+ContactEditorForm::OnDeviceStateChanged(Tizen::System::DeviceType deviceType, const Tizen::Base::String &state)
+{
+ if (deviceType != DEVICE_TYPE_STORAGE_CARD || __pPresentationModel->GetValue(DETAIL_PROPERTY_THUMBNAIL).IsEmpty())
+ {
+ return;
+ }
+
+ if (state.Equals(SD_CARD_UNMOUNTED, false) && File::IsFileExist(__pPresentationModel->GetValue(DETAIL_PROPERTY_THUMBNAIL)) == false)
+ {
+ __pPresentationModel->SetThumbnail(L"");
+ __pTableView->RefreshItem(TABLE_VIEW_THUMBNAIL_FIELD_INDEX, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+}
static const int IDA_POPUP_CONTACT_VALUE_CLOSE = 40;
static const int IDA_POPUP_DELETE_CANCEL = 41;
-static const int H_ITEM = 112;
+static const int H_ITEM = 140;
static const int X_EMPTY_IMAGE = 220;
static const int Y_EMPTY_IMAGE = 300;
static const int W_EMPTY_IMAGE = 280;
static const int H_EMPTY_COMMENT = 38;
static const int W_INITIAL_PANEL = 10;
static const int H_INITIAL_PANEL = 10;
-static const int H_SELECT_ALL = 108;
-static const int H_SEARCHBAR = 108;
+static const int H_SELECT_ALL = 112;
+static const int H_SEARCHBAR = 86;
static const int H_BOTTOM_LABEL = 48;
static const int H_GROUP_ITEM = 76;
static const int W_CONTACT_VALUE_POPUP = 720;
__pPresentationModel = ContactListPresentationModel::GetInstance();
__pSelectAll = new (std::nothrow) CheckButton();
- __pSelectAll->Construct(Rectangle(0, H_SEARCHBAR, clientBounds.width, H_SELECT_ALL), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_DEFAULT);
+ __pSelectAll->Construct(Rectangle(0, H_SEARCHBAR, clientBounds.width, H_SELECT_ALL), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_NONE);
__pSelectAll->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL"));
__pSelectAll->SetActionId(IDA_CHECK_SELECT_ALL_CHECKED, IDA_CHECK_SELECT_ALL_UNCHECKED);
__pSelectAll->AddActionEventListener(*this);
using namespace Tizen::Social;
using namespace Tizen::Ui::Controls;
-static const int W_FASTSCROLL_INDEX = 46;
-static const int W_THUMBNAIL_AREA = 112;
-static const int Y_THUMBNAIL = 8;
-static const int W_THUMBNAIL = 96;
-static const int H_THUMBNAIL = 96;
-static const int X_TEXT = 16;
-static const int Y_TEXT = 16;
+static const int W_THUMBNAIL_AREA = 134;
+static const int Y_THUMBNAIL = 16;
+static const int W_THUMBNAIL = 108;
+static const int H_THUMBNAIL = 108;
+static const int X_TEXT = 26;
+static const int Y_TEXT = 30;
static const int H_TEXT = 80;
-static const int FONT_SIZE_NAME = 44;
+static const int FONT_SIZE_NAME = 55;
static const unsigned int COLOR_ITEM_NORMAL = Color32<0, 0, 0>::Value;
static const unsigned int COLOR_ITEM_PRESSED = Color32<255, 255, 255>::Value;
}
pEnrichedText = new (std::nothrow) EnrichedText();
- pEnrichedText->Construct(Dimension(rect.width - (rect.x + X_TEXT + W_THUMBNAIL_AREA + W_FASTSCROLL_INDEX), H_TEXT));
+ pEnrichedText->Construct(Dimension(rect.width - (rect.x + X_TEXT + W_THUMBNAIL_AREA), H_TEXT));
pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
pEnrichedText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP);
pEnrichedText->SetTextAbbreviationEnabled(true);
if (__pThumbnail != null)
{
- r = canvas.DrawBitmap(Rectangle(rect.width - (W_THUMBNAIL_AREA + W_FASTSCROLL_INDEX), Y_THUMBNAIL, W_THUMBNAIL, H_THUMBNAIL), *__pThumbnail);
+ r = canvas.DrawBitmap(Rectangle(rect.width - (W_THUMBNAIL_AREA), Y_THUMBNAIL, W_THUMBNAIL, H_THUMBNAIL), *__pThumbnail);
TryCatch(r == E_SUCCESS, ret = false, "Unable to draw a thumbnail.");
}
static const int IDA_LIST_ELEMENT_VIDEO_CALL = 43;
static const int W_POPUP_ITEM_GAP = 20;
-static const int H_ITEM = 112;
+static const int H_ITEM = 140;
static const int X_EMPTY_IMAGE = 220;
static const int Y_EMPTY_IMAGE = 300;
static const int W_EMPTY_IMAGE = 280;
static const int H_GROUP_ITEM = 76;
static const int W_INITIAL_PANEL = 10;
static const int H_INITIAL_PANEL = 10;
-static const int H_SEARCHBAR = 108;
+static const int H_SEARCHBAR = 86;
static const int W_DELETE_POPUP = 720;
static const int H_DELETE_POPUP = 208;
static const int H_DELETE_LABEL = 94;
void
ContactListPanel::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, Tizen::Ui::Controls::SearchBarMode mode)
{
- //[TODO] to restore swept item.
- // need to be fixed with better idea..
- Rectangle bounds = __pListView->GetBounds();
- __pListView->SetBounds(bounds.x, bounds.y, bounds.width, bounds.height + 1);
- __pListView->Invalidate(true);
- __pListView->SetBounds(bounds);
-
if (mode == SEARCH_BAR_MODE_NORMAL)
{
__pListView->SetShowState(true);
__pPresentationModel->ResetSearchedContactList();
__pSearchListView->UpdateList();
}
+ else
+ {
+ //[TODO] to restore swept item.
+ // need to be fixed with better idea..
+ Rectangle bounds = __pListView->GetBounds();
+ __pListView->SetBounds(bounds.x, bounds.y, bounds.width, bounds.height + 1);
+ __pListView->Invalidate(true);
+ __pListView->SetBounds(bounds);
+ }
}
void
AppAssert(pForm);
pForm->SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, true);
+
+ if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT && __pListView->IsVisible())
+ {
+ __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
+ }
}
void
break;
case DETAIL_PROPERTY_THUMBNAIL:
{
- __pContact->GetValue(CONTACT_PROPERTY_ID_THUMBNAIL, returnString);
+ returnString = __pContact->GetThumbnailPath();
}
break;
default:
static const int IDA_CHECK_SELECT_ALL_CHECKED = 10;
static const int IDA_CHECK_SELECT_ALL_UNCHECKED = 11;
-static const int H_SEARCHBAR = 108;
-static const int H_SELECT_ALL = 108;
-static const int H_ITEM = 112;
+static const int H_SEARCHBAR = 86;
+static const int H_SELECT_ALL = 112;
+static const int H_ITEM = 140;
static const int H_GROUP_ITEM = 76;
static const int H_BOTTOM_LABEL = 48;
static const int X_LIST_ITEM_TEXT_MARGIN = 32;
__pPresentationModel = ContactListPresentationModel::GetInstance();
__pSelectAll = new (std::nothrow) CheckButton();
- __pSelectAll->Construct(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, H_SELECT_ALL), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_DEFAULT);
+ __pSelectAll->Construct(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, H_SELECT_ALL), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_NONE);
__pSelectAll->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL"));
__pSelectAll->SetActionId(IDA_CHECK_SELECT_ALL_CHECKED, IDA_CHECK_SELECT_ALL_UNCHECKED);
__pSelectAll->AddActionEventListener(*this);
static const int H_EMPTY_IMAGE = 280;
static const int Y_EMPTY_COMMENT = 618;
static const int H_EMPTY_COMMENT = 38;
-static const int H_ITEM = 108;
static const int H_GROUP_ITEM = 76;
-static const int H_LIST_ITEM =112;
+static const int H_LIST_ITEM =140;
+static const int H_SELECT_ALL = 112;
+static const int H_SEARCHBAR = 86;
static const int H_BOTTOM_LABEL = 48;
static const int W_CONTACT_VALUE_POPUP = 720;
static const int H_CONTACT_VALUE_POPUP = 700;
__pPresentationModel = GroupContactListPresentationModel::GetInstance();
__pSelectAllButton = new (std::nothrow) CheckButton();
- __pSelectAllButton->Construct(Rectangle(0, H_ITEM, GetClientAreaBounds().width, H_ITEM), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_DEFAULT);
+ __pSelectAllButton->Construct(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, H_SELECT_ALL), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_NONE);
__pSelectAllButton->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL"));
__pSelectAllButton->SetActionId(IDA_CHECK_SELECT_ALL_CHECKED, IDA_CHECK_SELECT_ALL_UNCHECKED);
__pSelectAllButton->AddActionEventListener(*this);
AddControl(*__pSelectAllButton);
__pListView = new (std::nothrow) GroupedListView();
- __pListView->Construct(Rectangle(0, H_ITEM * 2, GetClientAreaBounds().width, GetClientAreaBounds().height - H_ITEM * 2 - H_BOTTOM_LABEL), GROUPED_LIST_VIEW_STYLE_INDEXED, true, true);
+ __pListView->Construct(Rectangle(0, H_SEARCHBAR + H_SELECT_ALL, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR + H_SELECT_ALL - H_BOTTOM_LABEL), GROUPED_LIST_VIEW_STYLE_INDEXED, true, true);
__pListView->SetItemProvider(*this);
__pListView->AddFastScrollListener(*this);
__pListView->AddGroupedListViewItemEventListener(*this);
AddControl(*__pListView);
__pSearchBar = new (std::nothrow) SearchBar();
- __pSearchBar->Construct(Rectangle(0, 0, GetClientAreaBounds().width, H_ITEM));
+ __pSearchBar->Construct(Rectangle(0, 0, GetClientAreaBounds().width, H_SEARCHBAR));
__pSearchBar->SetGuideText(ResourceManager::GetString(L"IDS_COM_BODY_SEARCH"));
__pSearchBar->AddSearchBarEventListener(*this);
__pSearchBar->AddTextEventListener(*this);
AddControl(*__pSearchBar);
__pSearchListView = new (std::nothrow) GroupedListView();
- __pSearchListView->Construct(Rectangle(0, H_ITEM, GetClientAreaBounds().width, GetClientAreaBounds().height - H_ITEM - H_BOTTOM_LABEL), GROUPED_LIST_VIEW_STYLE_INDEXED, true, false);
+ __pSearchListView->Construct(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR - H_BOTTOM_LABEL), GROUPED_LIST_VIEW_STYLE_INDEXED, true, false);
__pSearchListView->SetItemProvider(*__pSearchListEvent);
__pSearchListView->AddGroupedListViewItemEventListener(*this);
__pSearchListView->AddTouchEventListener(*this);
static const wchar_t* IDB_MORE_NORMAL = L"00_icon_more.png";
static const wchar_t* IDB_MORE_PRESSED = L"00_icon_more_press.png";
-static const int H_SEARCHBAR = 108;
-static const int H_ITEM = 112;
+static const int H_SEARCHBAR = 86;
+static const int H_ITEM = 140;
static const int H_GROUP_ITEM = 76;
static const int X_MORE = 55;
void
GroupContactListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, SearchBarMode mode)
{
- //[TODO] to restore swept item.
- // need to be fixed with better idea..
- Rectangle bounds = __pListView->GetBounds();
- __pListView->SetBounds(bounds.x, bounds.y, bounds.width, bounds.height + 1);
- __pListView->Invalidate(true);
- __pListView->SetBounds(bounds);
-
if (mode == SEARCH_BAR_MODE_NORMAL)
{
__pListView->SetShowState(true);
__pPresentationModel->ResetSearchedContactList();
__pSearchListView->UpdateList();
}
+ else
+ {
+ //[TODO] to restore swept item.
+ // need to be fixed with better idea..
+ Rectangle bounds = __pListView->GetBounds();
+ __pListView->SetBounds(bounds.x, bounds.y, bounds.width, bounds.height + 1);
+ __pListView->Invalidate(true);
+ __pListView->SetBounds(bounds);
+ }
}
void
GroupContactListForm::OnKeypadClosed(Tizen::Ui::Control& source)
{
SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, true);
+
+ if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT && __pListView->IsVisible())
+ {
+ __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
+ }
}
void
using namespace Tizen::Ui::Controls;
static const int H_GROUP_ITEM = 76;
-static const int H_ITEM = 112;
+static const int H_ITEM = 140;
static const int X_LIST_ITEM_TEXT_MARGIN = 32;
SearchListEventListener::SearchListEventListener(ListAnnexStyle itemAnnexStyle, ContactListPresentationModel* pContactListPresentationModel)
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Controls;
-static const int W_THUMBNAIL_AREA = 112;
-static const int Y_THUMBNAIL = 8;
-static const int W_THUMBNAIL = 96;
-static const int H_THUMBNAIL = 96;
-static const int X_TEXT = 16;
+static const int W_THUMBNAIL_AREA = 134;
+static const int Y_THUMBNAIL = 16;
+static const int W_THUMBNAIL = 108;
+static const int H_THUMBNAIL = 108;
+static const int X_TEXT = 26;
static const int H_TEXT = 80;
-static const int Y_NAME = 16;
+static const int Y_NAME = 30;
static const unsigned int COLOR_TEXT_NORMAL = Color32<0, 0, 0>::Value;
static const unsigned int COLOR_TEXT_PRESSED = Color32<255, 255, 255>::Value;
static const unsigned int COLOR_SEARCHED_TEXT = Color32<255, 0, 255>::Value;
-static const int FONT_SIZE_NAME = 44;
+static const int FONT_SIZE_NAME = 55;
SearchListItem::SearchListItem(const Tizen::Base::String& name, Tizen::Graphics::Bitmap* pThumbnail, const Tizen::Base::String& searchedText)
: __name(name)
TextElement* pPostNameTextElement = null;
Color textColor;
Color searchedTextColor;
+ Font font;
+
+ font.Construct(FONT_STYLE_PLAIN , FONT_SIZE_NAME);
pEnrichedText = new (std::nothrow) EnrichedText();
pEnrichedText->Construct(Dimension(rect.width - (rect.x + X_TEXT + W_THUMBNAIL_AREA), rect.height));
pSearchedTextElement = new (std::nothrow) TextElement();
pSearchedTextElement->Construct(text);
pSearchedTextElement->SetTextColor(textColor);
+ pSearchedTextElement->SetFont(font);
pEnrichedText->Add(*pSearchedTextElement);
}
pPreNameTextElement = new (std::nothrow) TextElement();
pPreNameTextElement->Construct(preSearchedText);
pPreNameTextElement->SetTextColor(textColor);
+ pPreNameTextElement->SetFont(font);
pEnrichedText->Add(*pPreNameTextElement);
}
pSearchedTextElement = new (std::nothrow) TextElement();
pSearchedTextElement->Construct(searchedText);
pSearchedTextElement->SetTextColor(searchedTextColor);
+ pSearchedTextElement->SetFont(font);
pEnrichedText->Add(*pSearchedTextElement);
}
pPostNameTextElement = new (std::nothrow) TextElement();
pPostNameTextElement->Construct(postSearchedText);
pPostNameTextElement->SetTextColor(textColor);
+ pPostNameTextElement->SetFont(font);
pEnrichedText->Add(*pPostNameTextElement);
}