TizenRefApp-8100 Implement recipient field view 90/117090/2
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 2 Mar 2017 15:19:46 +0000 (17:19 +0200)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 2 Mar 2017 15:24:09 +0000 (17:24 +0200)
Change-Id: I1ccc078e439ebed08cc4d84714d114e36717afe9
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
17 files changed:
.cproject
edje/images/msg_composer_bubble.#.png [new file with mode: 0644]
edje/images/msg_composer_icon_bg.png [new file with mode: 0644]
edje/images/msg_composer_icon_recipients.png [new file with mode: 0644]
edje/images/msg_composer_icon_sender.png [new file with mode: 0644]
inc/Resource.h
res/edje/icons.edc
res/edje/recip_entry.edc [new file with mode: 0755]
res/edje/recip_layout.edc [new file with mode: 0755]
src/Common/Utils/inc/LangUtils.h
src/Common/View/src/CtxPopup.cpp
src/Common/View/src/StandardWindow.cpp
src/Composer/Controller/inc/RecipFrame.h
src/Composer/Controller/src/RecipFrame.cpp
src/Composer/View/inc/RecipEntryView.h [new file with mode: 0644]
src/Composer/View/inc/RecipLayout.h [new file with mode: 0644]
src/Composer/View/src/RecipEntryView.cpp [new file with mode: 0644]

index 3f171c404967af57f78563f060d1f7298a7b4d58..c8a094db3e6d9cd0701d737532308f429d0152f3 100644 (file)
--- a/.cproject
+++ b/.cproject
                                                                </option>
                                                                <option id="gnu.cpp.compiler.option.include.paths.2037910591" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Conversation/Main/Controller/inc}&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Composer/View/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Composer/Controller/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/MsgThread/View/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Settings/Controller/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="Native_API"/>
                                                                </option>
                                                                <option id="gnu.cpp.compiler.option.dialect.std.1756711526" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.c++11" valueType="enumerated"/>
-                                                               <option id="gnu.cpp.compiler.option.preprocessor.def.1776859471" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols"/>
+                                                               <option id="gnu.cpp.compiler.option.preprocessor.def.1776859471" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false"/>
                                                                <option id="gnu.cpp.compiler.option.other.other.1256197611" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -Wno-extern-c-compat" valueType="string"/>
                                                                <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1529131313" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
                                                        </tool>
                                                                </option>
                                                                <option id="gnu.cpp.compiler.option.include.paths.1895069727" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Conversation/Main/Controller/inc}&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Composer/View/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Composer/Controller/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/MsgThread/View/inc}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Settings/Controller/inc}&quot;"/>
diff --git a/edje/images/msg_composer_bubble.#.png b/edje/images/msg_composer_bubble.#.png
new file mode 100644 (file)
index 0000000..634c8eb
Binary files /dev/null and b/edje/images/msg_composer_bubble.#.png differ
diff --git a/edje/images/msg_composer_icon_bg.png b/edje/images/msg_composer_icon_bg.png
new file mode 100644 (file)
index 0000000..387eb59
Binary files /dev/null and b/edje/images/msg_composer_icon_bg.png differ
diff --git a/edje/images/msg_composer_icon_recipients.png b/edje/images/msg_composer_icon_recipients.png
new file mode 100644 (file)
index 0000000..62592d2
Binary files /dev/null and b/edje/images/msg_composer_icon_recipients.png differ
diff --git a/edje/images/msg_composer_icon_sender.png b/edje/images/msg_composer_icon_sender.png
new file mode 100644 (file)
index 0000000..ce958df
Binary files /dev/null and b/edje/images/msg_composer_icon_sender.png differ
index 439c0b9d02bfc7b0ddd10ee3931ae0358490e388..801ee6feb1150386d0ee1b0d49315327c6292d37 100644 (file)
@@ -37,5 +37,7 @@
 #define MSG_THREAD_LAYOUT_EDJ_PATH       EDJ_PATH"/msg_thread_layout.edj"
 #define THUMBNAIL_EDJ_PATH               EDJ_PATH"/msg_thumbnail.edj"
 #define DEFAULT_LAYOUT_EDJ_PATH          EDJ_PATH"/default_layout.edj"
+#define RECIP_LAYOUT_EDJ_PATH            EDJ_PATH"/recip_layout.edj"
+#define RECIP_ENTRY_EDJ_PATH             EDJ_PATH"/recip_entry.edj"
 
 #endif /* RESOURCE_H_ */
index 9110bb6bded4476e54ad2a167214078fe1481a6c..210a83b8758f6593b0d267125401604aa1330cd6 100755 (executable)
@@ -147,4 +147,97 @@ collections {
          }
       }
    }
+   group {
+      name: "recip_del_icon";
+      images {
+         image: "msg_composer_icon_bg.png" RAW;
+         image: "msg_composer_icon_sender.png" RAW;
+      }
+      parts {
+         part {
+            name: "bg";
+            type:IMAGE;
+            description {
+               state: "default" 0.0;
+               image.normal: "msg_composer_icon_bg.png";
+            }
+            description {
+               state: "pressed" 0.0;
+               color: 150 150 150 255;
+            }
+         }
+         part {
+            name: "icon";
+            type:IMAGE;
+            description {
+               state: "default" 0.0;
+               image.normal: "msg_composer_icon_sender.png";
+               color: 255 0 0 255;
+            }
+         }
+      }
+      programs {
+         program { name: "pressed";
+            source: "*";
+            signal: "mouse,down,1";
+            action: STATE_SET "pressed" 0.0;
+            target: "bg";
+            transition: LINEAR  0.1;
+         }
+         program { name: "unpressed";
+            source: "*";
+            signal: "mouse,up,1";
+            action: STATE_SET "default" 0.0;
+            target: "bg";
+            transition: LINEAR  0.1;
+         }
+      }
+   }
+   group {
+      name: "recip_contact_icon";
+      images {
+         image: "msg_composer_icon_bg.png" RAW;
+         image: "msg_composer_icon_recipients.png" RAW;
+      }
+      parts {
+         part {
+            name: "bg";
+            type:IMAGE;
+            description {
+               state: "default" 0.0;
+               image.normal: "msg_composer_icon_bg.png";
+               color: 255 166 0 255;
+            }
+            description {
+               state: "pressed" 0.0;
+               inherit: "default";
+               color: 184 119 0 255;
+            }
+         }
+         part {
+            name: "icon";
+            type:IMAGE;
+            description {
+               state: "default" 0.0;
+               image.normal: "msg_composer_icon_recipients.png";
+            }
+         }
+      }
+      programs {
+         program { name: "pressed";
+            source: "*";
+            signal: "mouse,down,1";
+            action: STATE_SET "pressed" 0.0;
+            target: "bg";
+            transition: LINEAR  0.1;
+         }
+         program { name: "unpressed";
+            source: "*";
+            signal: "mouse,up,1";
+            action: STATE_SET "default" 0.0;
+            target: "bg";
+            transition: LINEAR  0.1;
+         }
+      }
+   }
 }
\ No newline at end of file
diff --git a/res/edje/recip_entry.edc b/res/edje/recip_entry.edc
new file mode 100755 (executable)
index 0000000..64c3a59
--- /dev/null
@@ -0,0 +1,50 @@
+#include "macros.inl"
+
+collections {
+   BASE_SCALE;
+   images {
+       image: "msg_composer_bubble.#.png" RAW;
+   }
+   group { name: "main";
+      parts {
+         PADDING_LEFT("pad.left", 12);
+         PADDING_RIGHT("pad.right", 10);
+         PADDING_TOP("pad.top", 12);
+         PADDING_BOTTOM("pad.bottom", 13);
+         part {
+            name: "bg";
+            type: IMAGE;
+            scale: 1;
+            description {
+               state: "default";
+               image.normal: "msg_composer_bubble.#.png";
+               color: 255 255 255 255;
+            }
+         }
+         part { name: "swl.entry";
+            type: SWALLOW;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               align: 0 0.5;
+               rel1 { relative: 1.0 1.0; to_x: "pad.left"; to_y: "pad.top"; }
+               rel2 { relative: 0.0 0.0; to_x: "swl.icon"; to_y: "pad.bottom"; }
+               min: 0 37;
+               max: -1 -1;
+            }
+         }
+         part { name: "swl.icon";
+            type: SWALLOW;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               align: 1 0.5;
+               rel1 { relative: 0.0 0.0;  to_y: "swl.entry"; }
+               rel2 { relative: 1.0 1.0; to_y: "swl.entry"; }
+               min: 73 73;
+               max: 73 73;
+            }
+         }
+      }
+   }
+}
diff --git a/res/edje/recip_layout.edc b/res/edje/recip_layout.edc
new file mode 100755 (executable)
index 0000000..d4f89b8
--- /dev/null
@@ -0,0 +1,23 @@
+#include "macros.inl"
+
+collections {
+   BASE_SCALE;
+   group { name: "main";
+      parts {
+         PADDING_TOP("pad.top", 100);
+         part {
+            name: "swl.entry";
+            type: SWALLOW;
+            scale: 1;
+            description {
+               state: "default";
+               align: 0.5 0;
+               min: 318 0;
+               max: 318 0;
+               fixed: 1 0;
+               rel1 { relative: 0.0 1.0; to_y: "pad.top"; }
+            }
+         }
+      }
+   }
+}
index c0ab378bd0aa0056d31b14d370abe849bffd0717..275d38e87a6096ea6171b0e5d47f8b8679d1cbb0 100644 (file)
@@ -36,6 +36,7 @@ namespace Msg
             , m_pMsg(nullptr)
         {
         }
+
         explicit TText(const char *stringId, const char *domainName)
             : m_pDomain(domainName)
             , m_pMsg(stringId)
index 67ba6676ebdd82d723d76fd744a6ced6c4765747..fc6416770c7a50e64db05dddc66ddf60889944fb 100644 (file)
@@ -74,7 +74,7 @@ void CtxPopup::createCtxPopup(Evas_Object *parent)
 }
 
 void CtxPopup::setDirectionPriority(Elm_Ctxpopup_Direction first, Elm_Ctxpopup_Direction second,
-                                        Elm_Ctxpopup_Direction third, Elm_Ctxpopup_Direction fourth)
+                                    Elm_Ctxpopup_Direction third, Elm_Ctxpopup_Direction fourth)
 {
     elm_ctxpopup_direction_priority_set(getEo(), first, second, third, fourth);
 }
index 8fd510e823f6b48bf9113f74e10880622f874d78..84ad8b5de787146269baddd375bc5d6653101760 100644 (file)
@@ -29,8 +29,8 @@ StandardWindow::StandardWindow()
 {
     // Window:
     setEo(elm_win_add(nullptr, PACKAGE_NAME, ELM_WIN_BASIC));
-    elm_win_conformant_set(getEo(), EINA_TRUE);
-    elm_win_autodel_set(getEo(), EINA_TRUE);
+    elm_win_conformant_set(getEo(), true);
+    elm_win_autodel_set(getEo(), true);
 
     // Conform:
     m_pConform = elm_conformant_add(getEo());
@@ -44,9 +44,6 @@ StandardWindow::StandardWindow()
 
     // Bg:
     m_pBg = elm_bg_add(m_pConform);
-    evas_object_size_hint_weight_set(m_pBg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-    evas_object_show(m_pBg);
-
     elm_object_part_content_set(m_pConform, "elm.swallow.bg", m_pBg);
 }
 
index 2bd9570ec45610fa613c7fe812ae2f47585a1ac2..d671d3a24c84a65c136aba4b0b78290c764aa28c 100644 (file)
@@ -20,6 +20,8 @@
 #include "FrameController.h"
 #include "DefaultLayout.h"
 #include "BottomButton.h"
+#include "RecipLayout.h"
+#include "RecipEntryView.h"
 
 namespace Msg {
     class RecipFrame
@@ -40,12 +42,15 @@ namespace Msg {
             void onNextButtonClicked(Evas_Object *obj, void *event);
 
         private:
-            void prepareMainLayout();
+            void prepareLayouts();
             void prepareNextButton();
+            void prepareEntry();
 
         private:
-            DefaultLayout *m_pLayout;
+            DefaultLayout *m_pBaseLayout;
+            RecipLayout *m_pLayout;
             BottomButton *m_pNextButton;
+            RecipEntryView *m_pEntry;
     };
 }
 
index 0c07d5c14773f0b5645e91084b9b45e0b2706e73..c54c1a9d2cae1d8b4742b4196e0220723d2f58d1 100644 (file)
@@ -22,12 +22,15 @@ using namespace Msg;
 
 RecipFrame::RecipFrame(NaviFrameController &parent)
     : FrameController(parent)
+    , m_pBaseLayout(nullptr)
     , m_pLayout(nullptr)
     , m_pNextButton(nullptr)
+    , m_pEntry(nullptr)
 {
     MSG_LOG("");
-    prepareMainLayout();
+    prepareLayouts();
     prepareNextButton();
+    prepareEntry();
 }
 
 RecipFrame::~RecipFrame()
@@ -35,22 +38,35 @@ RecipFrame::~RecipFrame()
     MSG_LOG("");
 }
 
-void RecipFrame::prepareMainLayout()
+void RecipFrame::prepareLayouts()
 {
+    if (!m_pBaseLayout) {
+        m_pBaseLayout = new DefaultLayout(getParent());
+        m_pBaseLayout->addHwButtonEvent(EEXT_CALLBACK_BACK, makeCbFirst(&RecipFrame::onHwBackButtonPreessed), this);
+    }
+
     if (!m_pLayout) {
-        m_pLayout = new DefaultLayout(getParent());
-        m_pLayout->addHwButtonEvent(EEXT_CALLBACK_BACK, makeCbFirst(&RecipFrame::onHwBackButtonPreessed), this);
+        m_pLayout = new RecipLayout(*m_pBaseLayout);
+        m_pBaseLayout->setContent(*m_pLayout);
     }
 }
 
 void RecipFrame::prepareNextButton()
 {
     if (!m_pNextButton) {
-        m_pNextButton = new BottomButton(*m_pLayout);
+        m_pNextButton = new BottomButton(*m_pBaseLayout);
         View::addSmartCb(m_pNextButton->getInnerButton(), "clicked", makeCbFirst(&RecipFrame::onNextButtonClicked), this);
         m_pNextButton->setText(msgt("Next")); // TODO: localization
-        m_pLayout->setBottomButton(*m_pNextButton);
-        m_pLayout->showBottomButton(true);
+        m_pBaseLayout->setBottomButton(*m_pNextButton);
+        m_pBaseLayout->showBottomButton(true);
+    }
+}
+
+void RecipFrame::prepareEntry()
+{
+    if (!m_pEntry) {
+        m_pEntry = new RecipEntryView(*m_pLayout);
+        m_pLayout->setEntry(*m_pEntry);
     }
 }
 
@@ -58,7 +74,7 @@ void RecipFrame::onAttached(ViewItem &item)
 {
     MSG_LOG("");
     FrameController::onAttached(item);
-    setContent(*m_pLayout);
+    setContent(*m_pBaseLayout);
 }
 
 void RecipFrame::onHwBackButtonPreessed(Evas_Object *obj, void *event_info)
diff --git a/src/Composer/View/inc/RecipEntryView.h b/src/Composer/View/inc/RecipEntryView.h
new file mode 100644 (file)
index 0000000..c23e598
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2016  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RecipEntryView_h_
+#define RecipEntryView_h_
+
+#include "View.h"
+
+namespace Msg {
+    class RecipEntryView
+        : public View {
+
+        public:
+            enum ButtonId {
+                NoneButtonId,
+                ContactButtonId,
+                ClearButtonId
+            };
+
+        public:
+            RecipEntryView(Evas_Object *parent);
+            virtual ~RecipEntryView();
+
+            std::string getText() const;
+            void clear();
+            void showButton(ButtonId id);
+
+        private:
+            void onClearButtonClicked(Evas_Object *obj, void *event);
+            void onContactButtonClicked(Evas_Object *obj, void *event);
+
+        private:
+            void prepareEntry();
+            Evas_Object *createButton(const char *icon);
+            Evas_Object *prepareClearButton();
+            Evas_Object *prepareContactButton();
+
+        private:
+            Evas_Object *m_pEntry;
+            Evas_Object *m_pClearButton;
+            Evas_Object *m_pContactButton;
+    };
+}
+
+#endif /* RecipEntryView_h_ */
diff --git a/src/Composer/View/inc/RecipLayout.h b/src/Composer/View/inc/RecipLayout.h
new file mode 100644 (file)
index 0000000..3850dbf
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2016  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RecipLayout_h_
+#define RecipLayout_h_
+
+#include "View.h"
+
+namespace Msg {
+    class RecipLayout
+        : public View {
+
+        public:
+            RecipLayout(Evas_Object *parent);
+
+            void setEntry(Evas_Object *obj);
+    };
+
+    inline RecipLayout::RecipLayout(Evas_Object *parent)
+    {
+        setEo(addLayout(parent, RECIP_LAYOUT_EDJ_PATH, "main"));
+    }
+
+    inline void RecipLayout::setEntry(Evas_Object *obj)
+    {
+        setContent(obj, "swl.entry");
+    }
+}
+
+#endif /* RecipLayout_h_ */
diff --git a/src/Composer/View/src/RecipEntryView.cpp b/src/Composer/View/src/RecipEntryView.cpp
new file mode 100644 (file)
index 0000000..47c42e2
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2016  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "RecipEntryView.h"
+#include "Callback.h"
+#include <efl_extension.h>
+
+using namespace Msg;
+
+RecipEntryView::RecipEntryView(Evas_Object *parent)
+    : m_pEntry(nullptr)
+    , m_pClearButton(nullptr)
+    , m_pContactButton(nullptr)
+{
+    setEo(addLayout(parent, RECIP_ENTRY_EDJ_PATH, "main"));
+    prepareEntry();
+    showButton(ContactButtonId);
+}
+
+RecipEntryView::~RecipEntryView()
+{
+}
+
+void RecipEntryView::prepareEntry()
+{
+    m_pEntry = elm_entry_add(getEo());
+    elm_entry_cnp_mode_set(m_pEntry, ELM_CNP_MODE_PLAINTEXT);
+    elm_entry_editable_set(m_pEntry, true);
+    elm_entry_single_line_set(m_pEntry, true);
+    elm_entry_scrollable_set(m_pEntry, true);
+    eext_entry_selection_back_event_allow_set(m_pEntry, true);
+    elm_scroller_policy_set(m_pEntry, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
+    elm_entry_autocapital_type_set(m_pEntry, ELM_AUTOCAPITAL_TYPE_NONE);
+    elm_entry_input_panel_return_key_type_set(m_pEntry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH);
+    setText(m_pEntry, msgt("Enter recipient"), "elm.guide"); // TODO: localization
+    setContent(m_pEntry,  "swl.entry");
+}
+
+Evas_Object *RecipEntryView::createButton(const char *icon)
+{
+    Evas_Object *button = elm_button_add(getEo());
+    elm_object_style_set(button, "transparent");
+    Evas_Object *iconLayout = View::addLayout(button, ICONS_EDJ_PATH, icon);
+    setContent(button, iconLayout);
+    return button;
+}
+
+Evas_Object *RecipEntryView::prepareClearButton()
+{
+    if (!m_pClearButton) {
+        m_pClearButton = createButton("recip_del_icon");
+        addSmartCb(m_pClearButton, "clicked", makeCbFirst(&RecipEntryView::onClearButtonClicked), this);
+    }
+    return m_pClearButton;
+}
+
+Evas_Object *RecipEntryView::prepareContactButton()
+{
+    if (!m_pContactButton) {
+        m_pContactButton = createButton("recip_contact_icon");
+        addSmartCb(m_pContactButton, "clicked", makeCbFirst(&RecipEntryView::onContactButtonClicked), this);
+    }
+    return m_pContactButton;
+}
+
+std::string RecipEntryView::getText() const
+{
+    return markupToUtf8(elm_entry_entry_get(m_pEntry));
+}
+
+void RecipEntryView::clear()
+{
+    setText(m_pEntry, "");
+}
+
+void RecipEntryView::showButton(ButtonId id)
+{
+    Evas_Object *curButton = getContent("swl.icon");
+    Evas_Object *targetButton = nullptr;
+
+    switch (id) {
+        case ContactButtonId:
+            targetButton = prepareContactButton();
+            break;
+        case ClearButtonId:
+            targetButton = prepareClearButton();
+            break;
+        default:
+            break;
+    }
+
+    if (curButton != targetButton) {
+        Evas_Object *oldButton =  setContent(targetButton, "swl.icon", true);
+        if (oldButton)
+            evas_object_hide(oldButton);
+    }
+}
+
+void RecipEntryView::onClearButtonClicked(Evas_Object *obj, void *event)
+{
+}
+
+void RecipEntryView::onContactButtonClicked(Evas_Object *obj, void *event)
+{
+}