Evas_Object *popup = elm_popup_add(parent);
RETVM_IF(NULL == popup, NULL, "popup is not created");
- elm_object_part_text_set(popup, PART_POPUP_TITLE, text);
+ elm_object_style_set(popup, "circle");
+ evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+ Evas_Object *layout = elm_layout_add(popup);
+ elm_layout_theme_set(layout, "layout", "popup", "content/circle");
+ elm_object_part_text_set(layout, "elm.text.title",text);
+ elm_object_content_set(popup, layout);
evas_object_show(popup);
eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, _eext_popup_back_cb, parent);
return popup;
}
+/**
+ * @function ui_utils_popup_title_text_add
+ * @since_tizen 2.3
+ * @description Ui Utils Popup Add
+ * @parameter Evas_Object*: Evas Object Pointer, const char*: Const char Pointer , const char*: Const char Pointer
+ * @return Evas_Object*
+ */
+Evas_Object *ui_utils_popup_title_text_add(Evas_Object *parent, const char *title, const char *text)
+{
+ RETVM_IF(NULL == parent, NULL, "popup is null");
+
+ Evas_Object *popup = elm_popup_add(parent);
+ RETVM_IF(NULL == popup, NULL, "popup is not created");
+
+ elm_object_style_set(popup, "circle");
+ evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+ Evas_Object *layout = elm_layout_add(popup);
+ elm_layout_theme_set(layout, "layout", "popup", "content/circle");
+ elm_object_part_text_set(layout, "elm.text.title",title);
+ elm_object_part_text_set(layout, "elm.text",text);
+ elm_object_content_set(popup, layout);
+ evas_object_show(popup);
+ eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, _eext_popup_back_cb, parent);
+
+ return popup;
+}
/**
* @function ui_utils_popup_button_add
button = elm_button_add(popup);
RETVM_IF(NULL == button, NULL, "Failed to create button");
- elm_object_style_set(button, STYLE_POPUP_BUTTON);
+ elm_object_style_set(button, "popup/circle");
elm_object_text_set(button, ui_utils_text_add(text, NULL));
+ evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_part_content_set(popup, *part, button);
evas_object_smart_callback_add(button, EVENT_CLICKED, func, data);
*/
void ui_utils_guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
{
- RETM_IF(NULL == view, "view is NULL");
-
- Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
- RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+ RETM_IF(NULL == view, "view is NULL");
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
- elm_object_text_set(guide_popup_btn, txtInstruction);
- ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
}