void addGroupsView(Ux::SelectView *view);
protected:
+ virtual void onCreated() override;
+ virtual void onPageAttached(Ui::NavigatorPage *page) override;
virtual Ui::TabPage *createPage(Ui::View *view, Elm_Object_Item *item) override;
Ux::SelectView *m_ContactsView;
Ux::SelectView *m_GroupsView;
+ Evas_Object *m_TitleLayout;
};
}
}
+set(EDC_FILES chooser-title-layout.edc)
set(EDJ_DIR "${RES_DIR}/list/edje")
set(IMG_DIR "${RES_DIR}/list/images")
+foreach(EDC_FILE ${EDC_FILES})
+ get_filename_component(EDJ_FILE ${EDC_FILE} NAME_WE)
+ set(EDJ_FILE ${EDJ_FILE}.edj)
+
+ add_custom_target(${EDJ_FILE}
+ COMMAND edje_cc -id .. edje/${EDC_FILE} ${EDJ_FILE}
+ DEPENDS edje/${EDC_FILE}
+ )
+
+ add_dependencies(${PROJECT_NAME} ${EDJ_FILE})
+ install(FILES ${EDJ_FILE} DESTINATION ${EDJ_DIR})
+endforeach(${EDC_FILE})
+
install(DIRECTORY images/ DESTINATION ${IMG_DIR})
--- /dev/null
+/*
+ * 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 CHOOSER_TITLE_LAYOUT_H
+#define CHOOSER_TITLE_LAYOUT_H
+
+#include "ListPath.h"
+
+#define GROUP_CHOOSER_TITLE "chooser_title"
+#define PART_SELECTOR "swallow.selector"
+#define PART_MULTI_BTN "swallow.multi_btn"
+
+#endif /* CHOOSER_TITLE_LAYOUT_H */
#define LIST_EDJ_DIR "list/edje/"
#define LIST_ADD_BUTTON_ICON LIST_IMG_DIR"core_floating_icon_01.png"
+#define CHOOSER_TITLE_EDJ LIST_EDJ_DIR"chooser-title-layout.edj"
#endif /* LIST_PATH_H */
--- /dev/null
+/*
+ * 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 "ChooserTitleLayout.h"
+
+#define SELECTOR_LR 32
+#define SELECTOR_TB 20
+#define SELECTOR_H 120
+
+collections {
+ base_scale: 2.6;
+
+ group { GROUP_CHOOSER_TITLE;
+ parts {
+ rect { "rect.bg"; scale;
+ desc { "default";
+ min: 0 SELECTOR_H;
+ color: 250 250 250 255;
+ }
+ }
+ spacer { "spacer.left_top"; scale;
+ desc { "default";
+ min: SELECTOR_LR SELECTOR_TB;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 0.0 0.0;
+ }
+ }
+ spacer { "spacer.right_bottom"; scale;
+ desc { "default";
+ min: SELECTOR_LR SELECTOR_TB;
+ align: 1.0 1.0;
+ rel1.relative: 1.0 1.0;
+ rel2.relative: 1.0 1.0;
+ }
+ }
+ swallow { PART_SELECTOR; scale;
+ desc { "default";
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 1.0; to: "spacer.left_top"; }
+ rel2 { relative: 0.0 1.0; to_x: "spacer.right_bottom"; to_y: "spacer.left_top"; }
+ }
+ }
+ swallow { PART_MULTI_BTN; scale;
+ desc { "default";
+ align: 0.0 0.0;
+ rel1 { relative: 0.0 1.0; to_y: PART_SELECTOR; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ }
+ }
+}
#include "Contacts/Chooser/ContactsGroupsNavigator.h"
#include "Contacts/Chooser/ContactsPage.h"
+#include "App/Path.h"
#include "Ui/Hoversel.h"
#include "Ux/SelectView.h"
+#include "ChooserTitleLayout.h"
+
using namespace Contacts::Chooser;
ContactsGroupsNavigator::ContactsGroupsNavigator()
: TabNavigator(new Ui::Hoversel()),
- m_ContactsView(nullptr), m_GroupsView(nullptr)
+ m_ContactsView(nullptr), m_GroupsView(nullptr),
+ m_TitleLayout(nullptr)
{
}
addView(m_GroupsView);
}
+void ContactsGroupsNavigator::onCreated()
+{
+ m_TitleLayout = elm_layout_add(getEvasObject());
+ elm_layout_file_set(m_TitleLayout, App::getResourcePath(CHOOSER_TITLE_EDJ).c_str(), GROUP_CHOOSER_TITLE);
+ elm_object_part_content_set(m_TitleLayout, PART_SELECTOR, getSelector()->create(m_TitleLayout));
+}
+
+void ContactsGroupsNavigator::onPageAttached(Ui::NavigatorPage *page)
+{
+ page->setStyle("empty");
+ page->setContent("title", m_TitleLayout);
+}
+
Ui::TabPage *ContactsGroupsNavigator::createPage(Ui::View *view, Elm_Object_Item *item)
{
if (view == m_ContactsView) {