TSAM-5964: Cursor don't fcous to Recipient field and don't display keyboard after... 92/79092/2
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Fri, 8 Jul 2016 06:55:07 +0000 (09:55 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Fri, 8 Jul 2016 10:15:16 +0000 (13:15 +0300)
Change-Id: I5fb17106c584bee98b537710cb93222e82db8519
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
res/edje/conv_layout.edc
res/edje/recipient_panel.edc
src/Conversation/Main/Controller/src/Conversation.cpp
src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h
src/Conversation/Recipients/View/src/ConvRecipientsPanelView.cpp

index 475026f0a4b7447be0dc2714afd39a9f3a658294..105760d0ca70fb25deb7c15517a48dd5f1e1442b 100755 (executable)
@@ -77,11 +77,12 @@ collections {
                                scale: 1;
                                description {
                                        state: "default" 0.0;
-                                       fixed: 1 1;
+                                       fixed: 1 0;
+                                       visible: 1;
                                        min: 0 0;
                                        align: 0.0 0.0;
                                        rel1 {to: "rect"; relative:0.0 0.0;}
-                                       rel2 {to: "rect"; relative:1.0 0.0;}
+                                       rel2 {to: "rect"; relative:1.0 1.0;}
                                }
                        }
                        part {
index d9e035d0086020437a455b007067210d416b1a63..431d7983dfef720b7102eedac6e9c5068c43b383 100755 (executable)
@@ -144,24 +144,24 @@ group {
             scale: 1;
             description {
                 state: "default" 0.0;
-                visible: 0;
+                visible: 1;
+                fixed: 1 1;
                 min: 0 0;
-                max: -1 0;
+                max: 0 0;
             }
             description {
                 state: "show" 0.0;
                 inherit: "default" 0.0;
                 min: 0 MSG_COMPOSER_RECIPIENT_TO_FIELD_MIN_H;
-                fixed: 1 1;
-                visible: 1;
+                max: -1 -1;
                 rel1 { to_x: "entry_padding_left"; to_y: "entry_padding_top"; relative: 1.0 1.0; }
                 rel2 { to_x: "contact_padding_left"; to_y: "entry_padding_bottom"; relative: 0.0 0.0; }
             }
             description {
                 state: "show_with_invalid_icon" 0.0;
+                inherit: "default" 0.0;
                 min: 0 MSG_COMPOSER_RECIPIENT_TO_FIELD_MIN_H;
-                fixed: 1 1;
-                visible: 1;
+                max: -1 -1;
                 rel1 { to_x: "entry_padding_left"; to_y: "entry_padding_top"; relative: 1.0 1.0;}
                 rel2 { to_x: "img.invalid_icon"; to_y: "entry_padding_bottom"; relative: 0.0 0.0; }
             }
@@ -209,6 +209,7 @@ group {
             scale: 1;
             mouse_events: 1;
             description {
+                state: "default" 0.0;
                 visible: 0;
             }
             description {
@@ -243,14 +244,14 @@ group {
             name: "hide.ct_button";
             signal: "hide.ct_button";
             source: "*";
-            action: STATE_SET "hide" 0.0;
+            action: STATE_SET "default" 0.0;
             target: "swl.contact_btn";
         }
         program {
             name: "show.ct_button";
             signal: "show.ct_button";
             source: "*";
-            action: STATE_SET "default" 0.0;
+            action: STATE_SET "show" 0.0;
             target: "swl.contact_btn";
         }
         program {
index 64ed5de1f18e0f6fa3c7492acd5dcf5e3d137c95..e1aac81ef322403a9ed070cb83bf11ef49936442 100644 (file)
@@ -376,7 +376,6 @@ void Conversation::createRecipPanel(Evas_Object *parent)
     {
         m_pRecipPanel = new ConvRecipientsPanel(parent, getApp());
         m_pRecipPanel->setListener(this);
-        m_pRecipPanel->show();
         m_pLayout->setRecipientPanel(*m_pRecipPanel);
         m_pLayout->setRecipientRect(m_pRecipPanel->getAreaRect());
     }
index 8f5858227453a95651c9ffaaa2c3b6e39a25bc8e..da2b3c056477b885da5a7a22dfc7ecfdf7ebaf2f 100644 (file)
@@ -100,7 +100,7 @@ namespace Msg
 
         private:
             void create(Evas_Object *parent);
-            Evas_Object *createEntry(Evas_Object *parent);
+            Evas_Object *getEntry();
             Evas_Object *getPlusBtn();
             Evas_Object *getContactBtn();
             Evas_Object *createAreaRect(Evas_Object *parent);
index 137a948ff41012404115db820a71837243568b62..0431ad0094ccc78c38959417d34502e19ebbc373 100644 (file)
@@ -130,9 +130,10 @@ void ConvRecipientsPanelView::showMbe(bool show, bool animation)
 
 void ConvRecipientsPanelView::showEntry(bool show)
 {
+    if(show)
+        getEntry();
     const char *sig = show ? "show_entry" : "hide_entry";
     elm_object_signal_emit(m_pLayout, sig, "*");
-    show ? evas_object_show(m_pEntry) : evas_object_hide(m_pEntry);
 }
 
 bool ConvRecipientsPanelView::isMbeEmpty() const
@@ -167,27 +168,25 @@ void ConvRecipientsPanelView::create(Evas_Object *parent)
     evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0.0);
     evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
     setEo(box);
-    show();
 
     m_pLayout = elm_layout_add(box);
+    std::string path = PathUtils::getResourcePath(RECIPIENT_PANEL_EDJ_PATH);
+    elm_layout_file_set(m_pLayout, path.c_str(), "recipient_panel");
     evas_object_size_hint_weight_set(m_pLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
     evas_object_size_hint_align_set(m_pLayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
     evas_object_show(m_pLayout);
 
     elm_box_pack_end(box, m_pLayout);
 
-    std::string path = PathUtils::getResourcePath(RECIPIENT_PANEL_EDJ_PATH);
-    elm_layout_file_set(m_pLayout, path.c_str(), "recipient_panel");
-
     createAreaRect(m_pLayout);
-    Evas_Object *entry =  createEntry(m_pLayout);
-
-    elm_object_part_content_set(m_pLayout, "swl.entry", entry);
 }
 
-Evas_Object *ConvRecipientsPanelView::createEntry(Evas_Object *parent)
+Evas_Object *ConvRecipientsPanelView::getEntry()
 {
-    m_pEntry = elm_entry_add(parent);
+    if(m_pEntry)
+        return m_pEntry;
+
+    m_pEntry = elm_entry_add(m_pLayout);
     evas_object_show(m_pEntry);
     evas_object_size_hint_weight_set(m_pEntry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
     evas_object_size_hint_align_set(m_pEntry, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -212,6 +211,7 @@ Evas_Object *ConvRecipientsPanelView::createEntry(Evas_Object *parent)
     evas_object_smart_callback_add(m_pEntry, "maxlength,reached", SMART_CALLBACK(ConvRecipientsPanelView, onEntryMaxlengthReached), this);
     evas_object_event_callback_add(m_pEntry, EVAS_CALLBACK_KEY_DOWN, EVAS_EVENT_CALLBACK(ConvRecipientsPanelView, onKeyDown), this);
     addGeometryChangedCb(m_pEntry);
+    elm_object_part_content_set(m_pLayout, "swl.entry", m_pEntry);
     return m_pEntry;
 }