语言

Menu
Sites
Language
Adding Circle ProgresBar to box on rectangle wearable

I have problem with adding circular progress bar to box view. When adding circle surface the circle is too big on my rectangle device. As described in documentation ( https://developer.tizen.org/zh-hans/development/ui-practices/native-application/efl/ui-components/wearable-ui-components/circle-object?langredirect=1#offset ) when passing null as circle surface we should be able to set width and height manually, but the circle is not visible. 

Below is my code for adding content with circle to naviframe. 

Evas_Object *content, *circle_obj;

content = elm_box_add(ad->naviframe);
evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(content, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_horizontal_set(content, EINA_FALSE);

circle_obj = eext_circle_object_add(content, NULL);
evas_object_size_hint_min_set(circle_obj, 150, 150);
eext_circle_object_line_width_set(circle_obj, 20);
eext_circle_object_value_min_max_set(circle_obj, 0.0, 100.0);
eext_circle_object_value_set(circle_obj, 3.0);
evas_object_show(circle_obj);
elm_box_pack_start(content, circle_obj);

elm_naviframe_item_push(ad->naviframe, "Progres Ring", NULL, NULL, content, NULL);
编辑者为: Jakub Wiśniewski 20 1月, 2017

响应

3 回复
Armaan-Ul- Islam

When I applied the Circular Object on wearble I didn't used naviframe, It was over the box.

Evas_Object *content, *circle_obj;
content = elm_box_add(ad->win);
evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(content, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_horizontal_set(content, EINA_FALSE);
elm_object_content_set(ad->conform,content);
evas_object_show(content);

circle_obj = eext_circle_object_add(content, NULL);
evas_object_size_hint_min_set(circle_obj, 150, 150);
eext_circle_object_line_width_set(circle_obj, 20);
eext_circle_object_value_min_max_set(circle_obj, 0.0, 100.0);
eext_circle_object_value_set(circle_obj, 5.0);
evas_object_show(circle_obj);
elm_box_pack_end(content, circle_obj);

Do this code work in your wearable ?

Jakub Wiśniewski

It compiles and runs but the screen is black - so same effect.

Armaan-Ul- Islam

Can you share your 'create_base_gui()' function here ?