我有一个Tizen磨损应用程序,包含3个视图,每个视图都被推送到naviframe.
这三种观点是:
Genlist_A > Progressbar > Genlist_B
视图的布局由箭头显示.当用户触摸Genlist_A中的genlist项目时,将显示Progressbar,直到Genlist_B有要显示的数据.
此导航效果很好,因为所有视图都应显示.问题是当尝试从Genlist_B导航回Genlist_A时.当再次导航回显示进度条时,发生这种情况时唯一可以查看Genlist_A的方法是关闭进度条.
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");
}
上面的代码显示了进度条视图的创建.我在一些示例中看到使用了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撤消其数据时,如何关闭进度条?
最佳答案 更新
我找到了问题的解决方案.我在正确的轨道上使用了弹出naviframe的项目
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;
}
它的作用是跳转到标记为local_ad-> startview的指定naviframe,这只是通过在genlist中设置Elm_Object_Item来设置.
nf_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, genlist, "empty");
这对我有用.