언어 설정

Menu
Sites
Language
Issue regarding EFL

Hi all,

I am quite new at using ELF for developing wearable native applications and, after reading the full documentation and examples, there are several issues which I don't know how to fix them... I am not sure what it is wrong..

The idea is quite simple... when the app is launched, a list of several items is displayed. Once the user taps on one of them, a new screen will show up with information. I found an example of a similar app which did this with naviframes and displaying one on top of the other one.

The problem is the list is displayed correctly without using naviframes, but once I try to implement them .. a black screen is displayed with no sign of the list. 

 

typedef struct appdata {
    Evas_Object *win;
	Evas_Object *conform;
	Evas_Object *list;
	Evas_Object *nf;
} appdata_s;

Code where the window is created and showed:

ad->win = elm_win_util_standard_add(PACKAGE, PACKAGE);
    elm_win_autodel_set(ad->win, EINA_TRUE);

	if (elm_win_wm_rotation_supported_get(ad->win)) {
		int rots[4] = { 0, 90, 180, 270 };
		elm_win_wm_rotation_available_rotations_set(ad->win, (const int *)(&rots), 4);
	}

	evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL);
	eext_object_event_callback_add(ad->win, EEXT_CALLBACK_BACK, win_back_cb, ad);

Conform:

ad->conform = elm_conformant_add(ad->win);
    elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_SHOW);
	elm_win_indicator_opacity_set(ad->win, ELM_WIN_INDICATOR_OPAQUE);
	evas_object_size_hint_weight_set(ad->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_win_resize_object_add(ad->win, ad->conform);
	evas_object_show(ad->conform);


Naviframe:

ad->nf = elm_naviframe_add(ad->conform);
    elm_naviframe_prev_btn_auto_pushed_set(ad->nf, EINA_TRUE); /* since Tizen 2.4 */
	elm_object_content_set(ad->conform, ad->nf);
	evas_object_show(ad->nf);

List:

ad->list = elm_list_add(ad->nf);
    elm_list_item_append(ad->list, "Nuevo", NULL, NULL, NULL, NULL);
	elm_list_item_append(ad->list, "Relajación", NULL, NULL, NULL, ad);
	elm_list_item_append(ad->list, "Test", NULL, NULL, NULL, NULL);
	elm_list_item_append(ad->list, "Test", NULL, NULL, NULL, NULL);
	elm_object_content_set(ad->nf, ad->list);

	/* Change the scroller policy to fix the scroll only vertically */
	elm_scroller_policy_set(ad->list, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
	/* Enable bounce effect when the list reaches the vertical limits */
	elm_scroller_bounce_set(ad->list, EINA_FALSE, EINA_TRUE);
	evas_object_show(ad->list);

And at the end, I have this final code line:

/* Show window after base gui is set up */
    evas_object_show(ad->win);

 

If I "elm_object_content_set" the list directly to the conform, it works; but if I do it through the naviframe, it does not.
Do you know why is this happening? 

Thanks.

 

 

 

 

 

 

Edited by: Frank on 02 5월, 2018

Responses

2 댓글
GEUNSOO KIM

In your case, you'd better use "elm_naviframe_item_push()" like the following:

elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, ad->list, NULL);

good luck.

 

 

Yasin Ali

The naviframe container manages many views by stacking them and displaying the topmost one.

Check this link for more details: https://developer.tizen.org/development/guides/native-application/user-interface/efl/building-ui-layouts/naviframe

Hope it will help you.
If you find my post is helpful for you, please mark it as answer to promote this post to others.