Button/window not showing in GUI: – Gear wearables

Button/window not showing in GUI: – Gear wearables

BY 25 Jan 2017 Native Application Development

Following the samsung online tutorials, I seem to cant get the gui to show up on screen. Please check out the code from my create_base_gui function:

create_base_gui(appdata_s *ad)
{
    /* Window */
	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);*/

	/* Conformant */
	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->naviframe = elm_naviframe_add(ad->conform);
	elm_object_content_set(ad->conform, ad->naviframe);

	evas_object_show(ad->conform);

	/*Button*/
	ad->Button = elm_button_add(ad->naviframe);
	evas_object_size_hint_weight_set(ad->Button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(ad->Button, EVAS_HINT_FILL, 1);
	elm_object_text_set(ad->Button, "Record");
	evas_object_smart_callback_add(ad->Button, "clicked", RecordMode_Bt_Clicked, ad);

	evas_object_show(ad->Button);


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

 

 

Written by