언어 설정

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

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);

 

 

Responses

3 댓글
Shaswati Saha

What do you're trying to mean with countdown view? Is it one of those views that naviframe holds? And about which previous view you're telling about? Is it the previous one of countdown view? Why you're trying to show the countdown view on top of current view?

Please make the above things clear. 

Jakub Wiśniewski

1) I am using naviframe for holding all of my views to make back button navigation easier.

2) Countdown View is a view with timer that show 3 ... 2 ... 1 .. and goes to next view.  

Let's say I have views 1, 2 and 3. Now I go from view 1 to view 2 then after short time I go to view 3. In view 3 when I press back button I want to go directly to view 1. All views are shown by pushing to naviframe. In essense I wonder how to delete certain views from naviframe navigation stack (so they no longer exist).

You can forget the part about showing on top :P I did not think that through. Is there anything that i did not explained enough?

Shaswati Saha

So far I know, you can't delete any certain view. Please go through this link carefully, it may make the concept of naviframe clear to you.