TizenRefApp-7117 Review and update Dialer GUI 85/87785/3
authorEugene Kurzberg <i.kurtsberg@samsung.com>
Mon, 12 Sep 2016 06:25:26 +0000 (09:25 +0300)
committerEugene Kurzberg <i.kurtsberg@samsung.com>
Mon, 12 Sep 2016 06:25:26 +0000 (09:25 +0300)
[Implementation] Reimplemented Dialer predictive search GUI using spacers.
Refactored SearchResultsControl.

Change-Id: I40260c7b6e29bb74512954dc1443b62773c00be3
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
12 files changed:
lib-apps-common/res/apps-common/edje/apps-common-buttons.edc
lib-apps-common/res/apps-common/edje/apps-common-utils.edc
lib-phone/inc/Phone/Dialer/SearchResultsControl.h
lib-phone/res/dialer/CMakeLists.txt
lib-phone/res/dialer/edje/DialerLayout.h
lib-phone/res/dialer/edje/DialerLayoutColors.h
lib-phone/res/dialer/edje/DialerLayoutMetrics.h
lib-phone/res/dialer/edje/DialerPath.h
lib-phone/res/dialer/edje/DialerPredictiveLayout.h [new file with mode: 0644]
lib-phone/res/dialer/edje/dialer-predictive-layout.edc [new file with mode: 0644]
lib-phone/res/dialer/edje/dialer-predictive.edc [deleted file]
lib-phone/src/Phone/Dialer/SearchResultsControl.cpp

index eca35da..3209646 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 #include "apps-common-colors.edc"
+#include "apps-common-utils.edc"
 
 #define BUTTON_CORNER_RADIUS "35"
 #define BUTTON_DEFAULT_H 78
@@ -30,9 +31,7 @@
 #define BUTTON_SMALL_TEXT_H (BUTTOM_SMALL_H-(BUTTON_SMALL_TEXT_TB*2))
 
 #define BUTTON_CIRCLE_WH 98
-#define BUTTON_CIRLE_CONTENT_WH 60
-
-#define GLIDE_EASE_OUT(duration) CUBIC_BEZIER (duration) 0.25 0.46 0.45 1.0
+#define BUTTON_CIRCLE_CONTENT_WH 60
 
 styles {
        style {
@@ -85,7 +84,7 @@ collections {
                                name: "pressed_effect";
                                action: STATE_SET "default" 0.0;
                                target: "tizen_vg_shape2";
-                               transition: GLIDE_EASE_OUT(0.15);
+                               transition: TRANSITION_GLIDE(0.15);
                        }
                        program {
                                name: "unpressed";
@@ -93,7 +92,7 @@ collections {
                                source: "*";
                                action: STATE_SET "default" 0.0;
                                target: "rect.effect_bg";
-                               transition: GLIDE_EASE_OUT(0.45);
+                               transition: TRANSITION_GLIDE(0.45);
                        }
                        program {
                                name: "clicked";
@@ -177,7 +176,8 @@ collections {
                        }
                        swallow { "elm.swallow.content"; scale;
                                desc { "default";
-                                       min: BUTTON_CIRLE_CONTENT_WH BUTTON_CIRLE_CONTENT_WH;
+                                       fixed: 1 1;
+                                       min: BUTTON_CIRCLE_CONTENT_WH BUTTON_CIRCLE_CONTENT_WH;
                                        rel1.relative: 0.5 0.5;
                                        rel2.relative: 0.5 0.5;
                                }
index 5bc4464..49867c9 100644 (file)
@@ -15,6 +15,8 @@
  *
  */
 
+#define TRANSITION_GLIDE(duration) CUBIC_BEZIER (duration) 0.25 0.46 0.45 1.0
+
 #define IMAGE_WITH_COLOR(GROUP_NAME, IMAGE_PATH, COLOR_CLASS) \
        group { GROUP_NAME; \
                images.image: IMAGE_PATH COMP; \
index bedba4f..4ca1dce 100644 (file)
@@ -67,8 +67,8 @@ namespace Phone
                private:
                        virtual Evas_Object *onCreate(Evas_Object *parent) override;
 
-                       void setLayout(const char *groupName);
-                       void clearLayout();
+                       Evas_Object *getLayout() const;
+                       Evas_Object *setLayout(const char *groupName);
 
                        void setResultsEmpty();
                        void setResultsPresent();
index 3c4dbed..bac18ba 100644 (file)
@@ -1,4 +1,4 @@
-set(EDCFILES dialer-keypad.edc dialer-layout.edc dialer-predictive.edc)
+set(EDCFILES dialer-keypad.edc dialer-layout.edc dialer-predictive-layout.edc)
 set(EDJDIR "${RES_DIR}/dialer/edje")
 
 foreach(EDCFILE ${EDCFILES})
index 03a37eb..e516c74 100644 (file)
 #define PART_SWALLOW_CALL               "swallow.call"
 #define PART_SWALLOW_BACKSPACE          "swallow.backspace"
 
-#define GROUP_PREDICTIVE_NO_RESULTS     "predictive_noresults"
-#define PART_TEXT_ADD                   "text.add"
-
-#define GROUP_PREDICTIVE                "predictive"
-#define PART_SWALLOW_THUMBNAIL          "swallow.thumbnail"
-#define PART_SWALLOW_SPEEDDIAL          "swallow.speeddial"
-#define PART_TEXT_NAME                  "text.name"
-#define PART_TEXT_NUMBER                "text.number"
-#define PART_TEXT_1_LINE                "text.1line"
-#define PART_SWALLOW_RESULTS            "swallow.results"
-
-#define GROUP_SPEEDDIAL_NUMBER          "speeddial_number"
-
-#define GROUP_PREDICTIVE_RES_COUNT      "predictive_res_count"
-#define PART_TEXT_COUNT                 "text.count"
-#define PART_SWALLOW_ARROW              "swallow.arrow"
-
 #define GROUP_BUTTON_CALL               "button_call"
 #define GROUP_BUTTON_BACKSPACE          "button_backspace"
 
index 86b065d..b51e91d 100644 (file)
@@ -55,22 +55,6 @@ color_classes {
                name: "divider_bg";
                color: 217 217 217 255;
        }
-       color_class {//AO006
-               name: "predictive_bg";
-               color: 255 255 255 26;
-       }
-       color_class {
-               name: "predictive_bg_pressed";
-               color: 0 0 0 26;
-       }
-       color_class {//A03O003L1
-               name: "predictive_icon";
-               color:  61 185 204 128;
-       }
-       color_class {//A03O003
-               name: "predictive_icon_bg";
-               color:  255 255 255 255;
-       }
        color_class {//AO001
                name: "action_panel_bg";
                color: 255 255 255 255;
@@ -91,10 +75,6 @@ color_classes {
                name: "transparent_bg";
                color: 0 0 0 0;
        }
-       color_class {//AO027
-               name: "speeddial_ic_bg";
-               color: 250 250 250 102;
-       }
 }
 
 #endif /* DIALER_LAYOUT_COLORS_H */
index b54549b..ef5e020 100644 (file)
 #define BUTTON_BACKSPACE_X                  82
 #define BUTTON_BACKSPACE_Y                  ((ACTION_BUTTONS_H-BUTTON_BACKSPACE_SIZE)/2)
 
-#define PREDICTIVE_PICTURE_BG_W             162
-#define PREDICTIVE_PICTURE_SIZE             98
-#define PREDICTIVE_MAIN_TEXT_H              57
-#define PREDICTIVE_SUB_TEXT_H               45
-#define PREDICTIVE_TEXT_W                   446
-#define PREDICTIVE_PARTS_H                  48
-#define PREDICTIVE_PARTS_W                  48
-#define PREDICTIVE_RESULTS_BG_W             112
-#define PREDICTIVE_ADD_SIZE                 80
-
-#define OFFSET_PREDICTIVE_Y                 24
-#define OFFSET_PREDICTIVE_TEXT_Y            ((PREDICTIVE_H-PREDICTIVE_MAIN_TEXT_H-PREDICTIVE_SUB_TEXT_H)/2)
-#define OFFSET_PREDICTIVE_1_LINE_TEXT_Y     ((PREDICTIVE_H-PREDICTIVE_MAIN_TEXT_H)/2)
-#define SPACER_PREDICTIVE_Y                 1
-#define SPACER_PREDICTIVE_X                 32
-#define OFFSET_PREDICTIVE_ADD               32
-
-#define SPEEDDIAL_AREA_W                    76
-#define SPEEDDIAL_AREA_H                    45
-#define SPEEDDIAL_IC_SIZE                   28
-#define SPEEDIAL_TEXT_W                     18
-
-#define SPEEDDIAL_SPACER                    12
-#define OFFSET_INNER_SPEEDDIAL_AREA_H       ((SPEEDDIAL_AREA_W-SPEEDDIAL_IC_SIZE-SPEEDIAL_TEXT_W)/2)
-#define OFFSET_T_SPEEDDIAL_IC               9
-#define OFFSET_B_SPEEDDIAL_IC               8
-
 #endif /* DIALER_LAYOUT_METRICS_H */
index 2c86032..7e6fe69 100644 (file)
@@ -23,7 +23,7 @@
 
 #define DIALER_LAYOUT_EDJ       DIALER_EDJ_DIR"dialer-layout.edj"
 #define DIALER_KEYPAD_EDJ       DIALER_EDJ_DIR"dialer-keypad.edj"
-#define DIALER_PREDICTIVE_EDJ   DIALER_EDJ_DIR"dialer-predictive.edj"
+#define DIALER_PREDICTIVE_EDJ   DIALER_EDJ_DIR"dialer-predictive-layout.edj"
 
 #define KEYPAD_NUMBER_1         DIALER_IMG_DIR"keypad_number_01.png"
 #define KEYPAD_NUMBER_2         DIALER_IMG_DIR"keypad_number_02.png"
@@ -54,7 +54,7 @@
 #define PREDICTIVE_ADD          DIALER_IMG_DIR"keypad_speed_dial_add.png"
 #define PREDICTIVE_ARROW        DIALER_IMG_DIR"keypad_predictive_arrow.png"
 
-#define SPEEDDIAL_IC_BG         DIALER_IMG_DIR"keypad_speed_dial_ic_bg.#.png"
-#define SPEEDDIAL_IC            DIALER_IMG_DIR"keypad_speed_dial_ic.png"
+#define SPEED_DIAL_BG           DIALER_IMG_DIR"keypad_speed_dial_ic_bg.#.png"
+#define SPEED_DIAL_ICON         DIALER_IMG_DIR"keypad_speed_dial_ic.png"
 
 #endif /* DIALER_PATH_H */
diff --git a/lib-phone/res/dialer/edje/DialerPredictiveLayout.h b/lib-phone/res/dialer/edje/DialerPredictiveLayout.h
new file mode 100644 (file)
index 0000000..b94726b
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2015-2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 DIALER_PREDICTIVE_LAYOUT_H
+#define DIALER_PREDICTIVE_LAYOUT_H
+
+#include "DialerPath.h"
+
+#define GROUP_PREDICTIVE        "predictive"
+#define GROUP_NO_RESULTS        "no_results"
+#define GROUP_RESULTS           "results"
+#define GROUP_MORE_BTN          "more_btn"
+#define GROUP_SPEED_DIAL        "speed_dial"
+
+#define PART_CONTENT            "swallow.content"
+#define PART_BG                 "rect.bg"
+
+#define PART_NAME               "text.name"
+#define PART_NUMBER             "text.number"
+#define PART_COUNT              "text.count"
+#define PART_ADD_TEXT           "text.add"
+
+#define PART_THUMBNAIL          "swallow.thumbnail"
+#define PART_SPEED_DIAL         "swallow.speed_dial"
+#define PART_MORE_BTN           "swallow.more_btn"
+
+#define SIGNAL_PREDICTIVE_SHOW  "state,predictive,show"
+#define SIGNAL_PREDICTIVE_HIDE  "state,predictive,hide"
+
+#define SIGNAL_NUMBER_SHOW      "state,number,show"
+#define SIGNAL_NUMBER_HIDE      "state,number,hide"
+
+#endif /* DIALER_PREDICTIVE_LAYOUT_H */
diff --git a/lib-phone/res/dialer/edje/dialer-predictive-layout.edc b/lib-phone/res/dialer/edje/dialer-predictive-layout.edc
new file mode 100644 (file)
index 0000000..8f10575
--- /dev/null
@@ -0,0 +1,425 @@
+/*
+ * Copyright (c) 2015-2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "DialerPredictiveLayout.h"
+#include "../../../../lib-apps-common/res/apps-common/edje/apps-common-utils.edc"
+
+#define ADD_TEXT_L          32
+#define ADD_TEXT_SIZE       46
+#define ADD_ICON_R          17
+#define ADD_ICON_WH         80
+
+#define THUMBNAIL_LR        32
+#define THUMBNAIL_WH        98
+
+#define NAME_H              57
+#define NAME_TEXT_SIZE      40
+#define NUMBER_H            45
+#define NUMBER_TEXT_SIZE    32
+
+#define MORE_BTN_WH         48
+#define MORE_BTN_LR         32
+#define MORE_TEXT_SIZE      36
+
+#define SPEED_DIAL_R        12
+#define SPEED_DIAL_W        76
+#define SPEED_DIAL_H        45
+
+#define SPEED_DIAL_ICON_WH  28
+#define SPEED_DIAL_NUMBER_W 18
+#define SPEED_DIAL_TEXT_SIZE 32
+
+styles {
+       style {
+               name: "name_style";
+               base: "font=Tizen:style=Light font_size="NAME_TEXT_SIZE" color=#fafafa ellipsis=1.0";
+               tag: "match" "+color=#86edfc";
+       }
+       style {
+               name: "number_style";
+               base: "font=Tizen:style=Light font_size="NUMBER_TEXT_SIZE" color=#fafafa ellipsis=1.0";
+               tag: "match" "+color=#86edfc";
+       }
+       style {
+               name: "count_style";
+               base: "font=Tizen:style=Regular font_size="MORE_TEXT_SIZE" align=center color=#fafafa";
+       }
+       style {
+               name: "speed_dial_style";
+               base: "font=Tizen:style=Regular font_size="SPEED_DIAL_TEXT_SIZE" color=#fafafa";
+       }
+       style {
+               name: "add_text_style";
+               base: "font=Tizen:style=Light font_size="ADD_TEXT_SIZE" color=#fafafa ellipsis=1.0";
+       }
+}
+
+color_classes {
+       color_class { //AO006
+               name: "predictive_bg";
+               color: 250 250 250 25;
+       }
+       color_class {
+               name: "predictive_bg_pressed";
+               color: 0 0 0 25;
+       }
+       color_class { //AO027
+               name: "speed_dial_bg";
+               color: 250 250 250 102;
+       }
+       color_class { //AO028
+               name: "speed_dial_icon";
+               color: 250 250 250 255;
+       }
+}
+
+collections {
+       base_scale: 2.6;
+
+       group { GROUP_PREDICTIVE;
+               parts {
+                       rect { PART_BG; scale;
+                               desc { "default";
+                                       align: 0.0 1.0;
+                                       rel1.relative: 0.0 1.0;
+                                       color_class: "predictive_bg";
+                               }
+                               desc { "visible";
+                                       inherit: "default";
+                                       align: 0.0 0.0;
+                                       rel1.relative: 0.0 0.0;
+                               }
+                               desc { "pressed";
+                                       inherit: "visible";
+                                       color_class: "predictive_bg_pressed";
+                               }
+                       }
+                       swallow { PART_CONTENT;
+                               desc { "default";
+                                       visible: 0;
+                               }
+                               desc { "visible";
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "show";
+                               signal: SIGNAL_PREDICTIVE_SHOW;
+                               source: "*";
+                               action: STATE_SET "visible" 0.0;
+                               target: PART_BG;
+                               transition: TRANSITION_GLIDE(0.30);
+                               after: "show_content";
+                       }
+                       program {
+                               name: "hide";
+                               signal: SIGNAL_PREDICTIVE_HIDE;
+                               source: "*";
+                               action: STATE_SET "default" 0.0;
+                               target: PART_BG;
+                               transition: TRANSITION_GLIDE(0.30);
+                               after: "hide_content";
+                       }
+                       program {
+                               name: "show_content";
+                               action: STATE_SET "visible" 0.0;
+                               target: PART_CONTENT;
+                       }
+                       program {
+                               name: "hide_content";
+                               action: STATE_SET "default" 0.0;
+                               target: PART_CONTENT;
+                       }
+                       program {
+                               name: "pressed";
+                               signal: "mouse,down,*";
+                               source: PART_BG;
+                               action: STATE_SET "pressed" 0.0;
+                               target: PART_BG;
+                       }
+                       program {
+                               name: "unpressed";
+                               signal: "mouse,up,*";
+                               source: PART_BG;
+                               action: STATE_SET "visible" 0.0;
+                               target: PART_BG;
+                       }
+               }
+       }
+
+       group { GROUP_NO_RESULTS;
+               parts {
+                       spacer { "spacer.left"; scale;
+                               desc { "default";
+                                       align: 0.0 0.5;
+                                       min: ADD_TEXT_L 0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 0.0 1.0;
+                               }
+                       }
+                       spacer { "spacer.right"; scale;
+                               desc { "default";
+                                       align: 1.0 0.5;
+                                       min: ADD_ICON_R 0;
+                                       rel1.relative: 1.0 0.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+                       textblock { PART_ADD_TEXT; scale; repeat;
+                               desc { "default";
+                                       align: 0.0 0.5;
+                                       rel1 { relative: 1.0 0.0; to_x: "spacer.left"; }
+                                       rel2 { relative: 0.0 1.0; to_x: "image.add_icon"; }
+                                       text {
+                                               align: 0.0 0.5;
+                                               style: "add_text_style";
+                                       }
+                               }
+                       }
+                       image { "image.add_icon"; scale; repeat;
+                               images.image: PREDICTIVE_ADD COMP;
+                               desc { "default";
+                                       align: 1.0 0.5;
+                                       min: ADD_ICON_WH ADD_ICON_WH;
+                                       rel1 { relative: 0.0 0.5; to_x: "spacer.right"; }
+                                       rel2 { relative: 0.0 0.5; to_x: "spacer.right"; }
+                                       image.normal: PREDICTIVE_ADD;
+                               }
+                       }
+               }
+       }
+
+       group { GROUP_RESULTS;
+               parts {
+                       spacer { "spacer.thumbnail.left"; scale;
+                               desc { "default";
+                                       align: 0.0 0.5;
+                                       min: THUMBNAIL_LR 0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 0.0 1.0;
+                               }
+                       }
+                       swallow { PART_THUMBNAIL; scale; repeat;
+                               desc { "default";
+                                       align: 0.0 0.5;
+                                       min: THUMBNAIL_WH THUMBNAIL_WH;
+                                       rel1 { relative: 1.0 0.5; to_x: "spacer.thumbnail.left"; }
+                                       rel2 { relative: 1.0 0.5; to_x: "spacer.thumbnail.left"; }
+                               }
+                       }
+                       spacer { "spacer.text.left"; scale;
+                               desc { "default";
+                                       align: 0.0 0.5;
+                                       min: THUMBNAIL_LR (NAME_H+NUMBER_H);
+                                       rel1 { relative: 1.0 0.5; to_x: PART_THUMBNAIL; }
+                                       rel2 { relative: 1.0 0.5; to_x: PART_THUMBNAIL; }
+                               }
+                       }
+                       swallow { PART_SPEED_DIAL; repeat;
+                               desc { "default";
+                                       align: 0.0 0.5;
+                                       rel1 { relative: 1.0 0.0; to: "spacer.text.left"; }
+                                       rel2 { relative: 1.0 1.0; to_x: "spacer.text.left"; to_y: PART_NAME; }
+                               }
+                       }
+                       textblock { PART_NAME; scale; repeat;
+                               desc { "default";
+                                       align: 0.0 0.0;
+                                       min: 0 NAME_H;
+                                       rel1 { relative: 1.0 0.0; to_x: PART_SPEED_DIAL; to_y: "spacer.text.left"; }
+                                       rel2 { relative: 0.0 0.0; to_x: PART_MORE_BTN;   to_y: PART_NUMBER; }
+                                       text {
+                                               align: 0.0 0.5;
+                                               style: "name_style";
+                                       }
+                               }
+                       }
+                       textblock { PART_NUMBER; scale; repeat;
+                               desc { "default";
+                                       align: 0.0 1.0;
+                                       rel1 { relative: 1.0 1.0; to: "spacer.text.left"; }
+                                       rel2 { relative: 0.0 1.0; to_x: PART_MORE_BTN; to_y: "spacer.text.left"; }
+                                       text {
+                                               align: 0.0 0.5;
+                                               style: "number_style";
+                                       }
+                               }
+                               desc { "visible";
+                                       inherit: "default";
+                                       min: 0 NUMBER_H;
+                               }
+                       }
+                       swallow { PART_MORE_BTN;
+                               desc { "default";
+                                       align: 1.0 0.5;
+                                       rel1.relative: 1.0 0.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "show_number";
+                               signal: SIGNAL_NUMBER_SHOW;
+                               source: "*";
+                               action: STATE_SET "visible" 0.0;
+                               target: PART_NUMBER;
+                       }
+                       program {
+                               name: "hide_number";
+                               signal: SIGNAL_NUMBER_HIDE;
+                               source: "*";
+                               action: STATE_SET "default" 0.0;
+                               target: PART_NUMBER;
+                       }
+               }
+       }
+
+       group { GROUP_MORE_BTN;
+               parts {
+                       rect { PART_BG;
+                               desc { "default";
+                                       color: 0 0 0 0;
+                               }
+                               desc { "pressed";
+                                       color_class: "predictive_bg_pressed";
+                               }
+                       }
+                       spacer { "spacer.left"; scale;
+                               desc { "default";
+                                       align: 0.0 0.5;
+                                       min: MORE_BTN_LR 0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 0.0 1.0;
+                               }
+                       }
+                       spacer { "spacer.right"; scale;
+                               desc { "default";
+                                       align: 1.0 0.5;
+                                       min: MORE_BTN_LR 0;
+                                       rel1.relative: 1.0 0.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+                       spacer { "spacer.middle"; scale;
+                               desc { "default";
+                                       align: 0.0 0.5;
+                                       min: MORE_BTN_WH (2*MORE_BTN_WH);
+                                       rel1 { relative: 1.0 0.5; to_x: "spacer.left"; }
+                                       rel2 { relative: 0.0 0.5; to_x: "spacer.right"; }
+                               }
+                       }
+                       textblock { PART_COUNT; scale; repeat;
+                               desc { "default";
+                                       align: 0.5 0.0;
+                                       min: 0 MORE_BTN_WH;
+                                       rel1 { relative: 0.5 0.0; to: "spacer.middle"; }
+                                       rel2 { relative: 0.5 0.0; to: "spacer.middle"; }
+                                       text {
+                                               min: 1 0;
+                                               align: 0.0 0.5;
+                                               ellipsis: -1;
+                                               style: "count_style";
+                                       }
+                               }
+                       }
+                       image { "image.arrow"; scale; repeat;
+                               images.image: PREDICTIVE_ARROW COMP;
+                               desc { "default";
+                                       align: 1.0 1.0;
+                                       min: MORE_BTN_WH MORE_BTN_WH;
+                                       rel1 { relative: 1.0 1.0; to: "spacer.middle"; }
+                                       rel2 { relative: 1.0 1.0; to: "spacer.middle"; }
+                                       image.normal: PREDICTIVE_ARROW;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "pressed";
+                               signal: "mouse,down,*";
+                               source: PART_BG;
+                               action: STATE_SET "pressed" 0.0;
+                               target: PART_BG;
+                       }
+                       program {
+                               name: "unpressed";
+                               signal: "mouse,up,*";
+                               source: PART_BG;
+                               action: STATE_SET "default" 0.0;
+                               target: PART_BG;
+                       }
+               }
+       }
+
+       group { GROUP_SPEED_DIAL;
+               parts {
+                       spacer { "spacer.right"; scale;
+                               desc { "default";
+                                       align: 1.0 0.5;
+                                       min: SPEED_DIAL_R 0;
+                                       rel1.relative: 1.0 0.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+                       image { "image.bg"; scale;
+                               images.image: SPEED_DIAL_BG COMP;
+                               desc { "default";
+                                       align: 1.0 0.5;
+                                       min: SPEED_DIAL_W SPEED_DIAL_H;
+                                       rel1 { relative: 0.0 0.5; to_x: "spacer.right"; }
+                                       rel2 { relative: 0.0 0.5; to_x: "spacer.right"; }
+                                       image.normal: SPEED_DIAL_BG;
+                                       color_class: "speed_dial_bg";
+                               }
+                       }
+                       spacer { "spacer.middle"; scale;
+                               desc { "default";
+                                       align: 0.5 0.0;
+                                       min: (SPEED_DIAL_ICON_WH+SPEED_DIAL_NUMBER_W) 0;
+                                       rel1 { relative: 0.5 0.0; to: "image.bg"; }
+                                       rel2 { relative: 0.5 1.0; to: "image.bg"; }
+                               }
+                       }
+                       image { "image.icon"; scale;
+                               images.image: SPEED_DIAL_ICON COMP;
+                               desc { "default";
+                                       align: 0.0 0.5;
+                                       min: SPEED_DIAL_ICON_WH SPEED_DIAL_ICON_WH;
+                                       rel1 { relative: 0.0 0.5; to: "spacer.middle"; }
+                                       rel2 { relative: 0.0 0.5; to: "spacer.middle"; }
+                                       image.normal: SPEED_DIAL_ICON;
+                                       color_class: "speed_dial_icon";
+                               }
+                       }
+                       textblock { PART_NUMBER; scale;
+                               desc { "default";
+                                       align: 0.0 0.5;
+                                       min: SPEED_DIAL_NUMBER_W 0;
+                                       rel1 { relative: 1.0 0.0; to_x: "image.icon"; to_y: "spacer.middle"; }
+                                       rel2 { relative: 1.0 1.0; to_x: "image.icon"; to_y: "spacer.middle"; }
+                                       text {
+                                               align: 0.0 0.5;
+                                               style: "speed_dial_style";
+                                       }
+                               }
+                       }
+               }
+       }
+}
diff --git a/lib-phone/res/dialer/edje/dialer-predictive.edc b/lib-phone/res/dialer/edje/dialer-predictive.edc
deleted file mode 100644 (file)
index 0964a84..0000000
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * Copyright (c) 2015-2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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 "DialerLayout.h"
-#include "DialerLayoutMetrics.h"
-#include "DialerLayoutColors.h"
-
-images {
-       image: PREDICTIVE_ADD COMP;
-       image: PREDICTIVE_ARROW COMP;
-       image: SPEEDDIAL_IC_BG COMP;
-       image: SPEEDDIAL_IC COMP;
-}
-
-styles {
-       style {
-               name: "add_to_contacts_style";
-               base: "font=Tizen:style=Light font_size=46 color=#FAFAFA ellipsis=1.0";
-       }
-       style {
-               name: "highlight_style";
-               base: "font=Tizen:style=Light font_size=40 color=#FAFAFA ellipsis=1.0";
-               tag: "match" "+color=#86EDFC";
-       }
-       style {
-               name: "small_highlight_style";
-               base: "font=Tizen:style=Light font_size=32 color=#FAFAFA ellipsis=1.0";
-               tag: "match" "+color=#86EDFC";
-       }
-       style {
-               name: "count_style";
-               base: "font=Tizen:style=Regular font_size=36 align=center color=#FAFAFA ellipsis=1.0";
-       }
-       style {
-               name: "predictive_speeddial_style";
-               base: "font=Tizen:style=Regular font_size=32 color=#FFFAFA";
-       }
-
-}
-
-collections {
-       base_scale: 2.6;
-       group {
-               name: GROUP_PREDICTIVE_NO_RESULTS;
-               parts {
-                       part {
-                               name: "bg";
-                               type: RECT;
-                               description {
-                                       state: "default" 0.0;
-                                       color_class: "predictive_bg";
-                               }
-                               description {
-                                       state: "pressed" 0.0;
-                                       inherit: "default" 0.0;
-                                       color_class: "predictive_bg_pressed";
-                               }
-                       }
-                       part {
-                               name: PART_TEXT_ADD;
-                               type: TEXTBLOCK;
-                               scale: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       text {
-                                               align: 0.1 0.5;
-                                               style: "add_to_contacts_style";
-                                       }
-                                       rel1 { relative: ((OFFSET_PREDICTIVE_ADD+1)/TOTAL_W) ((OFFSET_PREDICTIVE_ADD+1)/PREDICTIVE_H); }
-                                       rel2 { relative: ((TOTAL_W-PREDICTIVE_H)/TOTAL_W) ((OFFSET_PREDICTIVE_ADD+PREDICTIVE_ADD_SIZE)/PREDICTIVE_H); to_x: "add_bg"; }
-                               }
-                       }
-                       part {
-                               name: "add_bg";
-                               type: RECT;
-                               description {
-                                       state: "default" 0.0;
-                                       color_class: "transparent_bg";
-                                       rel1 { relative: ((TOTAL_W-PREDICTIVE_H+1)/TOTAL_W) 0.0; }
-                                       rel2 { relative: 1.0 1.0; }
-                               }
-                       }
-                       part {
-                               name: "image.add";
-                               type: IMAGE;
-                               description {
-                                       state: "default" 0.0;
-                                       aspect: 1.0 1.0;
-                                       aspect_preference: SOURCE;
-                                       image.normal: PREDICTIVE_ADD;
-                                       rel1 { relative: ((OFFSET_PREDICTIVE_ADD+1)/PREDICTIVE_H) ((OFFSET_PREDICTIVE_ADD+1)/PREDICTIVE_H); to:"add_bg"; }
-                                       rel2 { relative: ((OFFSET_PREDICTIVE_ADD+PREDICTIVE_ADD_SIZE)/PREDICTIVE_H) ((OFFSET_PREDICTIVE_ADD+PREDICTIVE_ADD_SIZE)/PREDICTIVE_H); to:"add_bg"; }
-                               }
-                       }
-               }
-
-               programs {
-                       program {
-                               name: "pressed";
-                               signal: "mouse,down,*";
-                               source: "*";
-                               action: STATE_SET "pressed" 0.0;
-                               target: "bg";
-                       }
-                       program {
-                               name: "unpressed";
-                               signal: "mouse,up,*";
-                               source: "*";
-                               action: STATE_SET "default" 0.0;
-                               target: "bg";
-                       }
-               }
-       }
-
-       group {
-               name: GROUP_PREDICTIVE;
-               parts {
-                       part {
-                               name: "bg";
-                               type: RECT;
-                               description {
-                                       state: "default" 0.0;
-                                       color_class: "predictive_bg";
-                               }
-                               description {
-                                       state: "pressed" 0.0;
-                                       inherit: "default" 0.0;
-                                       color_class: "predictive_bg_pressed";
-                               }
-                       }
-                       part {
-                               name: "thumbnail_bg";
-                               type: RECT;
-                               description {
-                                       state: "default" 0.0;
-                                       color_class: "transparent_bg";
-                                       rel2 { relative: (PREDICTIVE_PICTURE_BG_W/TOTAL_W) 1.0; }
-                               }
-                       }
-                       part {
-                               name: PART_SWALLOW_THUMBNAIL;
-                               type: SWALLOW;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 { relative: ((SPACER_PREDICTIVE_X+1)/PREDICTIVE_PICTURE_BG_W) ((OFFSET_PREDICTIVE_Y+1)/PREDICTIVE_H); to: "thumbnail_bg"; }
-                                       rel2 { relative: ((SPACER_PREDICTIVE_X+PREDICTIVE_PICTURE_SIZE)/PREDICTIVE_PICTURE_BG_W) ((OFFSET_PREDICTIVE_Y+PREDICTIVE_PICTURE_SIZE)/PREDICTIVE_H); to: "thumbnail_bg"; }
-                               }
-                       }
-                       part {
-                               name: PART_SWALLOW_SPEEDDIAL;
-                               type: SWALLOW;
-                               description {
-                                       state: "default" 0.0;
-                                       visible: 0;
-                                       rel1 { relative: 1.0 ((OFFSET_PREDICTIVE_TEXT_Y+1)/PREDICTIVE_H); to_x: "thumbnail_bg"; }
-                                       rel2 { relative: ((PREDICTIVE_PICTURE_BG_W+SPEEDDIAL_AREA_W)/TOTAL_W) ((OFFSET_PREDICTIVE_TEXT_Y+PREDICTIVE_MAIN_TEXT_H)/PREDICTIVE_H); }
-                               }
-                               description {
-                                       state: "speeddial" 0.0;
-                                       inherit: "default" 0.0;
-                                       visible: 1;
-                               }
-                       }
-                       part {
-                               name: PART_TEXT_NAME;
-                               type: TEXTBLOCK;
-                               scale: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       text {
-                                               align: 0.0 0.5;
-                                               style: "highlight_style";
-                                       }
-                                       rel1 { relative: 1.0 ((OFFSET_PREDICTIVE_TEXT_Y+1)/PREDICTIVE_H); to_x: "thumbnail_bg"; }
-                                       rel2 { relative: 0.0 ((OFFSET_PREDICTIVE_TEXT_Y+PREDICTIVE_MAIN_TEXT_H)/PREDICTIVE_H); to_x: "result_bg"; }
-                               }
-                               description {
-                                       state: "speeddial" 0.0;
-                                       inherit: "default" 0.0;
-                                       rel1 {
-                                               relative: ((PREDICTIVE_PICTURE_BG_W+SPEEDDIAL_AREA_W + SPEEDDIAL_SPACER)/TOTAL_W) ((OFFSET_PREDICTIVE_TEXT_Y+1)/PREDICTIVE_H);
-                                               to_x: "";
-                                       }
-                                       rel2 {
-                                               relative: 0.0 ((OFFSET_PREDICTIVE_TEXT_Y+PREDICTIVE_MAIN_TEXT_H)/PREDICTIVE_H);
-                                               to_x: "result_bg";
-                                       }
-                               }
-                       }
-                       part {
-                               name: PART_TEXT_NUMBER;
-                               type: TEXTBLOCK;
-                               scale: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       text {
-                                               align: 0.0 0.5;
-                                               style: "small_highlight_style";
-                                       }
-                                       rel1 { relative: 1.0 ((OFFSET_PREDICTIVE_TEXT_Y+PREDICTIVE_MAIN_TEXT_H+1)/PREDICTIVE_H); to_x: "thumbnail_bg"; }
-                                       rel2 { relative: 0.0 ((OFFSET_PREDICTIVE_TEXT_Y+PREDICTIVE_MAIN_TEXT_H+PREDICTIVE_SUB_TEXT_H)/PREDICTIVE_H); to_x: "result_bg"; }
-                               }
-                       }
-                       part {
-                               name: PART_TEXT_1_LINE;
-                               type: TEXTBLOCK;
-                               scale: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       text {
-                                               align: 0.0 0.5;
-                                               style: "highlight_style";
-                                       }
-                                       rel1 { relative: 1.0 ((OFFSET_PREDICTIVE_1_LINE_TEXT_Y+1)/PREDICTIVE_H); to_x: "thumbnail_bg"; }
-                                       rel2 { relative: 0.0 ((OFFSET_PREDICTIVE_1_LINE_TEXT_Y+PREDICTIVE_MAIN_TEXT_H)/PREDICTIVE_H); to_x: "result_bg"; }
-                               }
-                       }
-                       part {
-                               name: "result_bg";
-                               type: RECT;
-                               description {
-                                       state: "default" 0.0;
-                                       color_class: "transparent_bg";
-                                       rel1 { relative: ((PREDICTIVE_PICTURE_BG_W+PREDICTIVE_TEXT_W+1)/TOTAL_W) 0.0; }
-                                       rel2 { relative: 1.0 1.0; }
-                               }
-                       }
-                       part {
-                               name: PART_SWALLOW_RESULTS;
-                               type: SWALLOW;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1.to: "result_bg";
-                                       rel2.to: "result_bg";
-                               }
-                       }
-               }
-               programs {
-                       program {
-                               name: "pressed";
-                               signal: "mouse,down,*";
-                               source: "*";
-                               action: STATE_SET "pressed" 0.0;
-                               target: "bg";
-                       }
-                       program {
-                               name: "unpressed";
-                               signal: "mouse,up,*";
-                               source: "*";
-                               action: STATE_SET "default" 0.0;
-                               target: "bg";
-                       }
-                       program {
-                               name: "show_speeddial_icon";
-                               signal: "show,speeddial,icon";
-                               action: STATE_SET "speeddial" 0.0;
-                               target: PART_SWALLOW_SPEEDDIAL;
-                               target: PART_TEXT_NAME;
-                       }
-                       program {
-                               name: "hide_speeddial_icon";
-                               signal: "hide,speeddial,icon";
-                               action: STATE_SET "default" 0.0;
-                               target: PART_SWALLOW_SPEEDDIAL;
-                               target: PART_TEXT_NAME;
-                       }
-               }
-       }
-
-       group {
-               name: GROUP_SPEEDDIAL_NUMBER;
-               parts {
-                       part {
-                               name: "bg";
-                               type: IMAGE;
-                               scale: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       image.normal: SPEEDDIAL_IC_BG;
-                                       color_class: "speeddial_ic_bg";
-                               }
-                       }
-                       part {
-                               name: "swallow.icon";
-                               type: IMAGE;
-                               scale: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1.relative: (OFFSET_INNER_SPEEDDIAL_AREA_H/SPEEDDIAL_AREA_W) (OFFSET_T_SPEEDDIAL_IC/SPEEDDIAL_AREA_H);
-                                       rel2.relative: ((OFFSET_INNER_SPEEDDIAL_AREA_H+SPEEDDIAL_IC_SIZE)/SPEEDDIAL_AREA_W) ((OFFSET_T_SPEEDDIAL_IC+SPEEDDIAL_IC_SIZE)/SPEEDDIAL_AREA_H);
-                                       image.normal: SPEEDDIAL_IC;
-                               }
-                       }
-                       part {
-                               name: PART_TEXT_NUMBER;
-                               type: TEXTBLOCK;
-                               scale: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 {
-                                               relative: 1.0 0.0;
-                                               to_x: "swallow.icon";
-                                       }
-                                       rel2.relative: 1.0 1.0;
-                                       text {
-                                               align: 0.0 0.5;
-                                               style: "predictive_speeddial_style";
-                                       }
-                               }
-                       }
-               }
-       }
-
-       group {
-               name: GROUP_PREDICTIVE_RES_COUNT;
-               parts {
-                       part {
-                               name: "bg";
-                               type: "RECT";
-                               description {
-                                       state: "default" 0.0;
-                                       color_class: "transparent_bg";
-                               }
-                       }
-                       part {
-                               name: PART_TEXT_COUNT;
-                               type: TEXTBLOCK;
-                               scale: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       text {
-                                               align: 0.5 0.0;
-                                               style: "count_style";
-                                       }
-                                       rel1 { relative: 0.0 ((OFFSET_PREDICTIVE_Y+1)/PREDICTIVE_H); }
-                                       rel2 { relative: 1.0 ((OFFSET_PREDICTIVE_Y+PREDICTIVE_PARTS_H)/PREDICTIVE_H); }
-                               }
-                       }
-                       part {
-                               name: PART_SWALLOW_ARROW;
-                               type: IMAGE;
-                               description {
-                                       state: "default" 0.0;
-                                       aspect: 1.0 1.0;
-                                       aspect_preference: SOURCE;
-                                       rel1 { relative: ((SPACER_PREDICTIVE_X+1)/PREDICTIVE_RESULTS_BG_W) ((OFFSET_PREDICTIVE_Y+PREDICTIVE_PARTS_H+SPACER_PREDICTIVE_Y+1)/PREDICTIVE_H); }
-                                       rel2 { relative: ((SPACER_PREDICTIVE_X+PREDICTIVE_PARTS_W)/PREDICTIVE_RESULTS_BG_W) ((OFFSET_PREDICTIVE_Y+2*PREDICTIVE_PARTS_H+SPACER_PREDICTIVE_Y)/PREDICTIVE_H); }
-                                       image.normal: PREDICTIVE_ARROW;
-                               }
-                               description {
-                                       state: "pressed" 0.0;
-                                       inherit: "default" 0.0;
-                                       color_class: "predictive_icon";
-                               }
-                       }
-               }
-               programs {
-                       program {
-                               name: "pressed";
-                               signal: "mouse,down,*";
-                               source: "*";
-                               action: STATE_SET "pressed" 0.0;
-                               target: PART_SWALLOW_ARROW;
-                       }
-                       program {
-                               name: "unpressed";
-                               signal: "mouse,up,*";
-                               source: "*";
-                               action: STATE_SET "default" 0.0;
-                               target: PART_SWALLOW_ARROW;
-                       }
-               }
-       }
-}
index f988f1f..3512814 100644 (file)
@@ -23,7 +23,7 @@
 #include "Utils/Callback.h"
 #include "Utils/Logger.h"
 
-#include "DialerLayout.h"
+#include "DialerPredictiveLayout.h"
 
 using namespace Phone::Dialer;
 
@@ -32,9 +32,6 @@ namespace
        const std::string layoutFilePath = App::getResourcePath(DIALER_PREDICTIVE_EDJ);
 }
 
-/* FIXME: Added for 2.4 SDK build */
-extern "C" Eina_List *elm_layout_content_swallow_list_get(const Evas_Object *obj);
-
 SearchResultsControl::SearchResultsControl()
        : m_Results(nullptr), m_State(ResultsNone),
          m_ResultsCount(nullptr)
@@ -43,6 +40,10 @@ SearchResultsControl::SearchResultsControl()
 
 void SearchResultsControl::setResults(const SearchResults *results)
 {
+       if (m_State == ResultsNone) {
+               elm_layout_signal_emit(getEvasObject(), SIGNAL_PREDICTIVE_SHOW, "");
+       }
+
        m_Results = results;
        if (!m_Results || m_Results->empty()) {
                setResultsEmpty();
@@ -54,7 +55,9 @@ void SearchResultsControl::setResults(const SearchResults *results)
 
 void SearchResultsControl::clearResults()
 {
-       setLayout(nullptr);
+       elm_layout_signal_emit(getEvasObject(), SIGNAL_PREDICTIVE_HIDE, "");
+       evas_object_del(getLayout());
+
        m_State = ResultsNone;
        m_Results = nullptr;
 }
@@ -67,35 +70,35 @@ void SearchResultsControl::setSelectedCallback(SelectedCallback callback)
 Evas_Object *SearchResultsControl::onCreate(Evas_Object *parent)
 {
        Evas_Object *layout = elm_layout_add(parent);
-       evas_object_event_callback_add(layout, EVAS_CALLBACK_MOUSE_UP,
-                       (Evas_Object_Event_Cb) makeCallback(&SearchResultsControl::onResultPressed), this);
+       elm_layout_file_set(layout, layoutFilePath.c_str(), GROUP_PREDICTIVE);
+
+       Evas_Object *edje = elm_layout_edje_get(layout);
+       edje_object_signal_callback_add(edje, "mouse,clicked,*", PART_BG,
+                       (Edje_Signal_Cb) makeCallback(&SearchResultsControl::onResultPressed), this);
+
        return layout;
 }
 
-void SearchResultsControl::setLayout(const char *groupName)
+Evas_Object *SearchResultsControl::getLayout() const
 {
-       clearLayout();
-       elm_layout_file_set(getEvasObject(), layoutFilePath.c_str(), groupName);
+       return elm_object_part_content_get(getEvasObject(), PART_CONTENT);
 }
 
-void SearchResultsControl::clearLayout()
+Evas_Object *SearchResultsControl::setLayout(const char *groupName)
 {
-       Eina_List *list = elm_layout_content_swallow_list_get(getEvasObject());
-       Eina_List *node = nullptr;
-       void *obj = nullptr;
-       EINA_LIST_FOREACH(list, node, obj) {
-               evas_object_del((Evas_Object *) obj);
-       }
-
-       eina_list_free(list);
+       Evas_Object *layout = elm_layout_add(getEvasObject());
+       elm_layout_file_set(layout, layoutFilePath.c_str(), groupName);
+       elm_object_part_content_set(getEvasObject(), PART_CONTENT, layout);
+       return layout;
 }
 
 void SearchResultsControl::setResultsEmpty()
 {
        if (m_State != ResultsEmpty) {
                m_State = ResultsEmpty;
-               setLayout(GROUP_PREDICTIVE_NO_RESULTS);
-               elm_object_translatable_part_text_set(getEvasObject(), PART_TEXT_ADD, "IDS_KPD_BUTTON_ADD_TO_CONTACTS_ABB2");
+
+               Evas_Object *layout = setLayout(GROUP_NO_RESULTS);
+               elm_object_translatable_part_text_set(layout, PART_ADD_TEXT, "IDS_KPD_BUTTON_ADD_TO_CONTACTS_ABB2");
        }
 }
 
@@ -103,7 +106,7 @@ void SearchResultsControl::setResultsPresent()
 {
        if (m_State != ResultsPresent && m_State != ResultsMany) {
                m_State = ResultsPresent;
-               setLayout(GROUP_PREDICTIVE);
+               setLayout(GROUP_RESULTS);
        }
 
        setResultInfo(m_Results->front());
@@ -116,52 +119,52 @@ void SearchResultsControl::setResultsCount(size_t count)
                        m_State = ResultsMany;
 
                        m_ResultsCount = elm_layout_add(getEvasObject());
-                       elm_layout_file_set(m_ResultsCount, layoutFilePath.c_str(), GROUP_PREDICTIVE_RES_COUNT);
-                       evas_object_propagate_events_set(m_ResultsCount, EINA_FALSE);
-                       evas_object_event_callback_add(m_ResultsCount, EVAS_CALLBACK_MOUSE_DOWN,
-                                       (Evas_Object_Event_Cb) makeCallback(&SearchResultsControl::onShowResultsPressed), this);
+                       elm_layout_file_set(m_ResultsCount, layoutFilePath.c_str(), GROUP_MORE_BTN);
+
+                       Evas_Object *edje = elm_layout_edje_get(m_ResultsCount);
+                       edje_object_signal_callback_add(edje, "mouse,clicked,*", PART_BG,
+                                       (Edje_Signal_Cb) makeCallback(&SearchResultsControl::onShowResultsPressed), this);
                }
 
-               elm_object_part_text_set(m_ResultsCount, PART_TEXT_COUNT,
+               elm_object_part_text_set(m_ResultsCount, PART_COUNT,
                                std::to_string(count).c_str());
        } else {
                m_ResultsCount = nullptr;
                m_State = ResultsPresent;
        }
 
-       elm_object_part_content_set(getEvasObject(), PART_SWALLOW_RESULTS, m_ResultsCount);
+       elm_object_part_content_set(getLayout(), PART_MORE_BTN, m_ResultsCount);
 }
 
 void SearchResultsControl::setResultInfo(SearchResultPtr result)
 {
-       Evas_Object *layout = getEvasObject();
-       elm_object_part_content_set(layout, PART_SWALLOW_THUMBNAIL,
+       Evas_Object *layout = getLayout();
+       elm_object_part_content_set(layout, PART_THUMBNAIL,
                        Utils::createThumbnail(layout, result->getId()));
 
        if (result->getName(false).empty()) {
-               elm_object_part_text_set(layout, PART_TEXT_1_LINE, result->getNumber(true).c_str());
-               elm_object_part_text_set(layout, PART_TEXT_NAME, "");
-               elm_object_part_text_set(layout, PART_TEXT_NUMBER, "");
+               elm_object_signal_emit(layout, SIGNAL_NUMBER_HIDE, "");
+               elm_object_part_text_set(layout, PART_NAME, result->getNumber(true).c_str());
+               elm_object_part_text_set(layout, PART_NUMBER, "");
        } else {
-               elm_object_part_text_set(layout, PART_TEXT_1_LINE, "");
-               elm_object_part_text_set(layout, PART_TEXT_NAME, result->getName(true).c_str());
-               elm_object_part_text_set(layout, PART_TEXT_NUMBER, result->getNumber(true).c_str());
+               elm_object_signal_emit(layout, SIGNAL_NUMBER_SHOW, "");
+               elm_object_part_text_set(layout, PART_NAME, result->getName(true).c_str());
+               elm_object_part_text_set(layout, PART_NUMBER, result->getNumber(true).c_str());
        }
 
-       if (result->getType() == ResultSpeedDial) {
-               setResultSpeedDial(result);
-               elm_object_signal_emit(getEvasObject(), "show,speeddial,icon", "");
-       } else {
-               elm_object_signal_emit(getEvasObject(), "hide,speeddial,icon", "");
-       }
+       setResultSpeedDial(result);
 }
 
 void SearchResultsControl::setResultSpeedDial(SearchResultPtr result)
 {
-       Evas_Object *speeddialLayout = elm_layout_add(getEvasObject());
-       elm_layout_file_set(speeddialLayout, layoutFilePath.c_str(), GROUP_SPEEDDIAL_NUMBER);
-       elm_object_part_text_set(speeddialLayout, PART_TEXT_NUMBER, result->getSearchString().c_str());
-       elm_object_part_content_set(getEvasObject(), PART_SWALLOW_SPEEDDIAL, speeddialLayout);
+       Evas_Object *layout = nullptr;
+       if (result->getType() == ResultSpeedDial) {
+               layout = elm_layout_add(getEvasObject());
+               elm_layout_file_set(layout, layoutFilePath.c_str(), GROUP_SPEED_DIAL);
+               elm_object_part_text_set(layout, PART_NUMBER, result->getSearchString().c_str());
+       }
+
+       elm_object_part_content_set(getLayout(), PART_SPEED_DIAL, layout);
 }
 
 void SearchResultsControl::onResultPressed()