Fixed issues(N_SE-28791, 28665) and applied GUI guide.
authorHongryeol Gil <hr.gil@samsung.com>
Mon, 18 Mar 2013 07:43:23 +0000 (16:43 +0900)
committerHongryeol Gil <hr.gil@samsung.com>
Mon, 18 Mar 2013 07:46:32 +0000 (16:46 +0900)
Change-Id: I336dba30ebe499a5085702e1e85dd98e5eef4fa2
Signed-off-by: Hongryeol Gil <hr.gil@samsung.com>
12 files changed:
inc/CtContactEditorForm.h
src/CtContactDetailsForm.cpp
src/CtContactEditorForm.cpp
src/CtContactListEditorPanel.cpp
src/CtContactListItem.cpp
src/CtContactListPanel.cpp
src/CtContactPresentationModel.cpp
src/CtContactSelectorForm.cpp
src/CtGroupContactListEditorForm.cpp
src/CtGroupContactListForm.cpp
src/CtSearchListEventListener.cpp
src/CtSearchListItem.cpp

index 3067b88..6863187 100644 (file)
@@ -24,7 +24,9 @@
 
 #include <FApp.h>
 #include <FBase.h>
+#include <FIo.h>
 #include <FUi.h>
+#include <FSystem.h>
 #include "CtIContactEventListener.h"
 #include "CtIContactsAppStateChangeEventListener.h"
 #include "CtTypes.h"
@@ -34,6 +36,7 @@ class ContactPresentationModel;
 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
@@ -46,6 +49,7 @@ class ContactEditorForm
        , public Tizen::Ui::Controls::IGroupedTableViewItemProvider
        , public Tizen::Ui::Controls::IScrollEventListener
        , public Tizen::Ui::Scenes::ISceneEventListener
+       , public Tizen::System::IDeviceEventListener
        , public IContactEventListener
        , public IContactsAppStateChangeEventListener
 {
@@ -117,6 +121,10 @@ public:
        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);
@@ -171,6 +179,7 @@ private:
        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;
index c056fc8..b395c05 100644 (file)
@@ -73,7 +73,7 @@ static const wchar_t* IDB_MORE_PRESSED = L"00_icon_more_press.png";
 
 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;
@@ -90,8 +90,8 @@ static const int W_QUICK_BUTTON_GAP = 148;
 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;
@@ -123,11 +123,11 @@ static const unsigned int COLOR_TABLE_BG = Color32<248, 246, 239>::Value;
 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;
@@ -1323,7 +1323,7 @@ ContactDetailsForm::CreateValueTypeItem(int itemWidth, Tizen::Ui::Controls::Tabl
        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);
 
index 2889eb8..7f4ec85 100644 (file)
@@ -34,11 +34,13 @@ using namespace Tizen::Base;
 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;
@@ -84,6 +86,7 @@ static const wchar_t* INPUT_TYPE_CAMERA = L"camera";
 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;
@@ -152,6 +155,7 @@ ContactEditorForm::ContactEditorForm(void)
 , __pAddressFieldItem(null)
 , __pImAddressFieldItem(null)
 , __pUrlFieldItem(null)
+, __pFileEventManager(null)
 , __pCurrentFocusedItem(null)
 , __pDefaultPhoneNumberContextMenu(null)
 , __pMoreInformationContextMenu(null)
@@ -215,6 +219,8 @@ ContactEditorForm::OnInitializing(void)
        __pPresentationModel->Construct();
        __pPresentationModel->AddContactChangeListener(*this);
 
+       DeviceManager::AddDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
+
        return E_SUCCESS;
 }
 
@@ -269,6 +275,9 @@ ContactEditorForm::OnTerminating(void)
        delete __pMoreInformationContextMenu;
        delete __pThumbnailContextMenu;
        delete __pTypeContextMenu;
+       delete __pFileEventManager;
+
+       DeviceManager::RemoveDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
 
        return r;
 }
@@ -320,6 +329,10 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio
                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));
@@ -339,6 +352,10 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio
                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));
@@ -358,6 +375,10 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio
                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));
@@ -377,6 +398,10 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio
                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));
@@ -396,6 +421,10 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio
                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));
@@ -437,6 +466,9 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio
                {
                        __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:
@@ -449,6 +481,9 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio
                        ChangeNameFieldStatus();
 
                        __pTableView->UpdateTableView();
+
+                       Rectangle clientBounds = GetClientAreaBounds();
+                       __pTableView->SetSize(clientBounds.width, clientBounds.height);
                }
                break;
        case IDA_BUTTON_MORE_INFO:
@@ -2251,11 +2286,6 @@ ContactEditorForm::ChangeNameFieldStatus(void)
 
        __isExpandable = (__isExpandable == true) ? false : true;
 
-       if (__pNameFieldItem == __pCurrentFocusedItem)
-       {
-               SetFocus();
-       }
-
        return r;
 }
 
@@ -2677,7 +2707,7 @@ ContactEditorForm::OnTextValueChanged(const Tizen::Ui::Control& source)
        pDeleteButton->SetShowState(true);
 
        __pTableView->UpdateTableView();
-       __pTableView->SetSize(GetClientAreaBounds().width, GetClientAreaBounds().height);
+       pEditField->ShowKeypad();
 }
 
 void
@@ -3145,6 +3175,13 @@ ContactEditorForm::OnAppControlCompleteResponseReceived(const Tizen::App::AppId&
 
                __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)))
        {
@@ -3153,6 +3190,13 @@ ContactEditorForm::OnAppControlCompleteResponseReceived(const Tizen::App::AppId&
 
                __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)))
        {
@@ -3271,3 +3315,25 @@ void
 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);
+       }
+}
index fff8118..eefd351 100644 (file)
@@ -51,7 +51,7 @@ static const int IDA_FOOTER_DONE = 32;
 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;
@@ -60,8 +60,8 @@ static const int Y_EMPTY_COMMENT = 618;
 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;
@@ -139,7 +139,7 @@ ContactListEditorPanel::OnInitializing(void)
        __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);
index 84edabe..3260a67 100644 (file)
@@ -26,16 +26,15 @@ using namespace Tizen::Graphics;
 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;
@@ -82,7 +81,7 @@ ContactListItem::OnDraw(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::
        }
 
        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);
@@ -93,7 +92,7 @@ ContactListItem::OnDraw(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::
 
        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.");
        }
 
index 3dd921a..4052629 100644 (file)
@@ -59,7 +59,7 @@ static const int IDA_LIST_ELEMENT_MESSAGE = 42;
 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;
@@ -69,7 +69,7 @@ static const int H_EMPTY_COMMENT = 38;
 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;
@@ -574,13 +574,6 @@ ContactListPanel::OnCategoriesChanged(void)
 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);
@@ -588,6 +581,15 @@ ContactListPanel::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source,
                __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
@@ -1096,6 +1098,11 @@ ContactListPanel::OnKeypadClosed(Tizen::Ui::Control& source)
        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
index 5bacc26..8ae3214 100644 (file)
@@ -500,7 +500,7 @@ ContactPresentationModel::GetValue(DetailProperty id, int index)
                break;
        case DETAIL_PROPERTY_THUMBNAIL:
                {
-                       __pContact->GetValue(CONTACT_PROPERTY_ID_THUMBNAIL, returnString);
+                       returnString = __pContact->GetThumbnailPath();
                }
                break;
        default:
index 98e0fec..edb63fb 100644 (file)
@@ -44,9 +44,9 @@ static const int IDA_FOOTER_CANCEL = 1;
 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;
@@ -87,7 +87,7 @@ ContactSelectorForm::OnInitializing(void)
        __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);
index eb86230..c91c8aa 100644 (file)
@@ -49,9 +49,10 @@ static const int W_EMPTY_IMAGE = 280;
 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;
@@ -114,14 +115,14 @@ GroupContactListEditorForm::OnInitializing(void)
        __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);
@@ -129,7 +130,7 @@ GroupContactListEditorForm::OnInitializing(void)
        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);
@@ -140,7 +141,7 @@ GroupContactListEditorForm::OnInitializing(void)
        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);
index 36b2322..b8d27a9 100644 (file)
@@ -53,8 +53,8 @@ static const wchar_t* IDB_NO_CONTENTS = L"00_Nocontents_text.png";
 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;
 
@@ -729,13 +729,6 @@ GroupContactListForm::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listVie
 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);
@@ -743,6 +736,15 @@ GroupContactListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& sou
                __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
@@ -1023,6 +1025,11 @@ 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
index ea23ddf..374be71 100644 (file)
@@ -29,7 +29,7 @@ using namespace Tizen::Graphics;
 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)
index 5f31e9d..7c1e476 100644 (file)
@@ -25,19 +25,19 @@ using namespace Tizen::Base;
 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)
@@ -64,6 +64,9 @@ SearchListItem::GetDisplayEnrichedTextN(const Tizen::Graphics::Rectangle& rect,
        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));
@@ -89,6 +92,7 @@ SearchListItem::GetDisplayEnrichedTextN(const Tizen::Graphics::Rectangle& rect,
                        pSearchedTextElement = new (std::nothrow) TextElement();
                        pSearchedTextElement->Construct(text);
                        pSearchedTextElement->SetTextColor(textColor);
+                       pSearchedTextElement->SetFont(font);
                        pEnrichedText->Add(*pSearchedTextElement);
                }
 
@@ -114,6 +118,7 @@ SearchListItem::GetDisplayEnrichedTextN(const Tizen::Graphics::Rectangle& rect,
                pPreNameTextElement = new (std::nothrow) TextElement();
                pPreNameTextElement->Construct(preSearchedText);
                pPreNameTextElement->SetTextColor(textColor);
+               pPreNameTextElement->SetFont(font);
 
                pEnrichedText->Add(*pPreNameTextElement);
        }
@@ -123,6 +128,7 @@ SearchListItem::GetDisplayEnrichedTextN(const Tizen::Graphics::Rectangle& rect,
                pSearchedTextElement = new (std::nothrow) TextElement();
                pSearchedTextElement->Construct(searchedText);
                pSearchedTextElement->SetTextColor(searchedTextColor);
+               pSearchedTextElement->SetFont(font);
 
                pEnrichedText->Add(*pSearchedTextElement);
        }
@@ -132,6 +138,7 @@ SearchListItem::GetDisplayEnrichedTextN(const Tizen::Graphics::Rectangle& rect,
                pPostNameTextElement = new (std::nothrow) TextElement();
                pPostNameTextElement->Construct(postSearchedText);
                pPostNameTextElement->SetTextColor(textColor);
+               pPostNameTextElement->SetFont(font);
 
                pEnrichedText->Add(*pPostNameTextElement);
        }