1. remove icon part from basic view. 99/59799/1
authorHermet Park <hermet@hermet.pe.kr>
Thu, 18 Feb 2016 14:26:24 +0000 (23:26 +0900)
committerHermet Park <hermet@hermet.pe.kr>
Thu, 18 Feb 2016 14:26:24 +0000 (23:26 +0900)
2. add no title view example.

Change-Id: If6578430476ac39a4ceb1f2c2d3a4185efb67711

src/efl/mobile/ui_basic_view.cpp
src/efl/mobile/ui_basic_view.h
src/efl/ui_viewmgr.cpp
src/interface/ui_view_base.h
src/main.cpp
src/page2_controller.h
src/page3_controller.h
src/page4_controller.h
src/page5_controller.h [new file with mode: 0644]

index d399efa60ad7f1f220bd29b8abd22bb4ac4fbbde..cea4561e054aaedd5f78df10418765b32f05014d 100644 (file)
@@ -111,19 +111,6 @@ bool ui_basic_view::set_subtitle(const char *text)
        return false;
 }
 
-bool ui_basic_view::set_icon(Evas_Object *icon)
-{
-       if (this->layout)
-       {
-               elm_object_part_content_set(this->layout, "elm.swallow.icon", icon);
-               if (icon) elm_object_signal_emit(this->layout, "elm,state,icon,show", "elm");
-               else elm_object_signal_emit(this->layout, "elm,state,icon,hide", "elm");
-               return true;
-       }
-       LOGE("Layout is not exist!");
-       return false;
-}
-
 bool ui_basic_view::set_title_left_btn(Evas_Object *title_left_btn)
 {
        if (this->layout)
@@ -188,7 +175,7 @@ bool ui_basic_view::set_title(const char *text)
        return false;
 }
 
-Evas_Object *ui_basic_view::set_content(Evas_Object *content, const char *title, const char *subtitle, Evas_Object *icon, Evas_Object *title_left_btn,
+Evas_Object *ui_basic_view::set_content(Evas_Object *content, const char *title, const char *subtitle, Evas_Object *title_left_btn,
         Evas_Object *title_right_btn)
 {
        Evas_Object *pcontent = this->set_content(content);
@@ -197,7 +184,6 @@ Evas_Object *ui_basic_view::set_content(Evas_Object *content, const char *title,
        {
                this->set_title(title);
                this->set_subtitle(subtitle);
-               this->set_icon(icon);
                this->set_title_left_btn(title_left_btn);
                this->set_title_right_btn(title_right_btn);
        }
index d9a1add8ec63d8cb0b946071a6c2d8b44cdded05..565614f133950d075c8130c44063ebdec6006ca2 100644 (file)
@@ -44,10 +44,9 @@ public:
        virtual ~ui_basic_view();
 
        Evas_Object *set_content(Evas_Object *content, const char *title = NULL);
-       Evas_Object *set_content(Evas_Object *content, const char *title, const char *subtitle, Evas_Object *icon, Evas_Object *title_left_btn, Evas_Object *title_right_btn);
+       Evas_Object *set_content(Evas_Object *content, const char *title, const char *subtitle, Evas_Object *title_left_btn, Evas_Object *title_right_btn);
        bool set_title_badge(const char *text);
        bool set_subtitle(const char *text);
-       bool set_icon(Evas_Object *icon);
        bool set_title_left_btn(Evas_Object *title_left_btn);
        bool set_title_right_btn(Evas_Object *title_right_btn);
        bool set_title(const char *text);
index dd7e4bf0cae9e27a487095430e7f50ee9dd35bce..e85f4fb2df9ec441a4fcefdae563cea58cc46051 100644 (file)
@@ -107,7 +107,7 @@ ui_viewmgr::ui_viewmgr(const char *pkg)
 
        //Set Indicator properties
        elm_win_indicator_mode_set(this->win, ELM_WIN_INDICATOR_SHOW);
-       elm_win_indicator_opacity_set(this->win, ELM_WIN_INDICATOR_TRANSPARENT);
+       elm_win_indicator_opacity_set(this->win, ELM_WIN_INDICATOR_OPAQUE);
        elm_win_autodel_set(this->win, EINA_TRUE);
 }
 
index 8dd7b83d2642e5b4ec9d5a9036aa65199cde70cf..8c9abfd700331a029f1c62641b2e7ea96f9138d7 100644 (file)
@@ -133,7 +133,6 @@ protected:
         */
        virtual void destroy();
 
-
        virtual void unload_content() = 0;
 
        /// Return the state of event block.
index 368fd3b400aa93b1e7843c36e11be79f00f90431..e3483ad271680632d6849b97ca0cfe0997fe2f35 100644 (file)
@@ -15,6 +15,7 @@
  *
  */
 #include "main.h"
+#include "page5_controller.h"
 #include "page4_controller.h"
 #include "page3_controller.h"
 #include "page2_controller.h"
index a1ee6d8dbaebc37d8e27c11f74aeb49b7a92b125..06e3f94e532f498ac6d3b8f8a595cb0662f0751d 100644 (file)
@@ -59,8 +59,8 @@ public:
                Evas_Object *right_title_btn = elm_button_add(view->get_base());
                elm_object_text_set(right_title_btn, "Done");
 
-               //Arguments: content, title, subtitle, icon, title left button, title right button
-               view->set_content(content, "Title Buttons", NULL, NULL, left_title_btn, right_title_btn);
+               //Arguments: content, title, subtitle, title left button, title right button
+               view->set_content(content, "Title Buttons", NULL, left_title_btn, right_title_btn);
        }
 };
 
index 0eebfe46d8d68aed54187471a855d51ff34d1fc3..2d1dd0ffad10af5f93dbf7128e614c1776ce5be0 100644 (file)
@@ -52,8 +52,8 @@ public:
                        },
                        this->ad);
 
-               //Arguments: content, title, subtitle, icon, title left button, title right button
-               view->set_content(content, "Title", "Subtitle", NULL, NULL, NULL);
+               //Arguments: content, title, subtitle, title left button, title right button
+               view->set_content(content, "Title", "Subtitle", NULL, NULL);
        }
 };
 
index 17a5aec92916be0a84992928311b050a1b2f124d..434b394c9e0b605ba0e3ce2a483a6b6aac0961b4 100644 (file)
@@ -48,7 +48,7 @@ public:
                        [](void *data, Evas_Object *obj, void *event_info) -> void
                        {
                                appdata_s *ad = static_cast<appdata_s *>(data);
-                               ad->viewmgr->deactivate();
+                               page5(ad);
                        }, this->ad);
 
                //Arguments: content, title
diff --git a/src/page5_controller.h b/src/page5_controller.h
new file mode 100644 (file)
index 0000000..a12ec14
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 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.
+ *
+ */
+class page5_controller: public ui_controller
+{
+private:
+       appdata_s *ad;
+
+public:
+       page5_controller(appdata_s *ad)
+                       : ad(ad)
+       {
+               //No basic form.
+               ad->viewmgr->push_view(new ui_view(this, "page5"));
+       }
+
+       ~page5_controller()
+       {
+       }
+
+       void load()
+       {
+               //Initialize contents.
+
+               ui_view *view = dynamic_cast<ui_view *>(this->get_view());
+
+               //Create a main content.
+               Evas_Object *content = create_content(view->get_base(), "ViewMgr Demo<br>Page 5<br>(No Title View)",
+                               //Prev Button
+                       [](void *data, Evas_Object *obj, void *event_info) -> void
+                       {
+                               appdata_s *ad = static_cast<appdata_s *>(data);
+                               ad->viewmgr->pop_view();
+                       },
+                       //Next Button
+                       [](void *data, Evas_Object *obj, void *event_info) -> void
+                       {
+                               appdata_s *ad = static_cast<appdata_s *>(data);
+                               ad->viewmgr->deactivate();
+                       }, this->ad);
+
+               view->set_content(content);
+       }
+};
+
+void page5(appdata_s *ad)
+{
+       new page5_controller(ad);
+}