Native Tizen removes naviframe element

I have a Tizen wear app, which consists of 3 views, and each of the views fits in naviframe. Three types:

Genlist_A> Progressbar> Genlist_B

The layout of the views is shown by arrows. When the user touches the list item in Genlist_A, then it is displayed Progressbaruntil Genlist_Bit displays the data.

This navigation works well, as all views are displayed as they should. The problem is trying to move from Genlist_Bto Genlist_A. When you move backward Progressbarand only one way to view Genlist_Ait when it happens is to close it Progressbar.

void _create_progressbar()
{
    Evas_Object *nf = local_ad->naviframe;
    Evas_Object *progressbar;
    Evas_Object *layout;

    layout = elm_layout_add(nf);
    elm_layout_file_set(layout, ELM_DEMO_EDJ, "progessbar");
    evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    progressbar = elm_progressbar_add(layout);
    elm_object_style_set(progressbar, "process");
    evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_show(progressbar);
    elm_progressbar_pulse(progressbar, EINA_TRUE);
    elm_object_part_content_set(layout, "process", progressbar);
    elm_object_content_set(layout, layout);
    elm_naviframe_item_push(nf, "ProgressBar", NULL, NULL, layout, "empty");
}

progressbar. , elm_naviframe_item_pop_cb_set. , , .

nf_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, scroller, "empty");
elm_naviframe_item_pop_cb_set(nf_it, _naviframe_pop_cb, ad->win);

, Genlist_B ?

+4
1

Update . ,

nf_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, scroller, "empty");
elm_naviframe_item_pop_cb_set(nf_it, _naviframe_pop_cb, ad->win);

, , _naviframe_pop_cb

static Eina_Bool _naviframe_pop_cb(void *data, Elm_Object_Item *it)
{
    elm_naviframe_item_pop_to(local_ad->startview);
    return EINA_TRUE;
}

, naviframe, local_ad->startview, Elm_Object_Item .

 nf_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, genlist, "empty");

.

+1

Source: https://habr.com/ru/post/1662507/


All Articles