Add item to naviframe without adding to stack (or show on top)

Add item to naviframe without adding to stack (or show on top)

BY 08 Feb 2017 Native Application Development

Is there a way to add view (box with some label) to naviframe and not add it to naviframe stack?

I have countdown, that I go to next view after and when I press back button I want to go to previous view , not to count down view. Or I could show countdown on top of current view – how to do it then?

I used standard code for adding naviframe eg:

 

static Eina_Bool naviframe_pop_cb(void *data, Elm_Object_Item *it)
{
	return EINA_TRUE;
}

    // adding box to naviframe and pushing
    Evas_Object *box = elm_box_add(ad->naviframe);
    elm_box_padding_set(box, 0, 10);
	evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
	elm_box_horizontal_set(box, EINA_FALSE);
	elm_object_content_set(ad->naviframe, box);

	Evas_Object *pool_button = elm_button_add(box);
	elm_object_style_set(pool_button, "white_emtpy_button");
	evas_object_size_hint_weight_set(pool_button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(pool_button, EVAS_HINT_FILL, EVAS_HINT_FILL);
	elm_object_text_set(pool_button, i18n_get_text("pool"));
	evas_object_smart_callback_add(pool_button, "clicked", pull_clicked, ad);
	evas_object_show(pool_button);
	elm_box_pack_end(box, pool_button);

    Elm_Object_Item *nav_it = elm_naviframe_item_push(ad->naviframe, NULL, NULL, NULL, box, NULL);
    elm_naviframe_item_title_enabled_set(nav_it, EINA_FALSE, EINA_FALSE);
	elm_naviframe_item_pop_cb_set(nav_it, naviframe_pop_cb, NULL);

 

 

Written by