Proper way to use a layout for progress indication

Proper way to use a layout for progress indication

BY 21 Sep 2018 Native Application Development

Hello, I’m looking to figure out how to use a layout to contain a circle progress bar and a label. It’s a countdown indicator, and I can’t figure out how to make both a progress bar and label show together in a naviframe. I’m missing something, but I just can’t figure out what. I’m using the naviframe with a bunch of lists to make cascading selections, and then I want to show a countdown at the end. I can’t get either the circle or label to show when I pop the last list off.

The naviframe works great for the lists. But I need it to lead somewhere. I have one more function that pops the last list off which I would expect to show the layout. But, it doesn’t. Any help would be appreciated.

static void gt_create_progressbar(appdata_s *ad)
{
    ad->circle_surface = eext_circle_surface_conformant_add(ad->countdown_layout);
    ad->circle_progressbar = eext_circle_object_progressbar_add(ad->countdown_layout, ad->circle_surface);
    evas_object_hide(ad->circle_progressbar);
}

static void gt_create_label(appdata_s *ad)
{
    ad->countdown_label =  elm_label_add(ad->countdown_layout);
    evas_object_size_hint_weight_set(ad->countdown_label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ad->countdown_label, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_align_set(ad->countdown_label, 0.5, 0.5);
}

static void gt_create_countdown_layout(appdata_s *ad)
{
    ad->countdown_layout = elm_layout_add(ad->naviframe);
    gt_create_progressbar(ad);  
    gt_create_label(ad);
}

static void gt_create_conform(appdate_s *ad)
{
    ad->conform = elm_conformant_add(ad->win);

	evas_object_size_hint_weight_set(ad->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);

    gt_naviframe_create(ad);
	gt_create_countdown_layout(ad);
	gt_list_create(ad);

    elm_naviframe_item_push(ad->naviframe, "Countdown", NULL, NULL, ad->countdown_layout, NULL);
    elm_naviframe_item_push(ad->naviframe, "Z", NULL, NULL, ad->list4, NULL);
    elm_naviframe_item_push(ad->naviframe, "Y", NULL, NULL, ad->list3, NULL);
    elm_naviframe_item_push(ad->naviframe, "X", NULL, NULL, ad->list2, NULL);
    elm_naviframe_item_push(ad->naviframe, "W", NULL, NULL, ad->list1, NULL);

}

 

Written by