Design Introduction “Air” Styles Mobile Design Principles Styles UX Overview Design Patterns UI Components for Tizen App Design 2.3 TV Design Principles Styles UX Overview Patterns UI Components Wearable Development Tizen Studio Overview Download Tizen Extensions for Visual Studio Family IoT extension SDK Docs Blog Blog Announcing the Tizen Studio 3.7 Release Announcing the Tizen Studio 3.1 Release Community Forums General Support Tizen .NET Web Application Development Native Application Development SDK & IDE Design Introduction “Air” Styles Mobile Design Principles Styles UX Overview Design Patterns UI Components for Tizen App Design 2.3 TV Design Principles Styles UX Overview Patterns UI Components Wearable Development Tizen Studio Overview Download Tizen Extensions for Visual Studio Family IoT extension SDK Docs Blog Blog Announcing the Tizen Studio 3.7 Release Announcing the Tizen Studio 3.1 Release Community Forums General Support Tizen .NET Web Application Development Native Application Development SDK & IDE
Button Position (ELM Gear S2)
The following code generates the basic UI, including a button. The button should appear at the bottom of the screen, but it is at top for some reason.
Any help is appreciated!
static void create_base_gui(appdata_s *ad, int width, int height)
{
int ret;
watch_time_h watch_time = NULL;
/* Window */
ret = watch_app_get_elm_win(&ad->win);
if (ret != APP_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, “failed to get window. err = %d”, ret);
return;
}
evas_object_resize(ad->win, width, height);
/* Conformant */
ad->conform = elm_conformant_add(ad->win);
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);
/* Label*/
ad->label = elm_label_add(ad->conform);
evas_object_resize(ad->label, width, height / 3);
evas_object_move(ad->label, 0, height / 3);
evas_object_show(ad->label);
/*OK Button*/
ad->button = elm_button_add(ad->conform);
evas_object_resize(ad->button, width, height / 4);
elm_object_style_set(ad->button, “bottom/queue”);
elm_object_text_set(ad->button, “CLICK”);
evas_object_smart_callback_add(ad->button, “clicked”, btn_clicked_cb, ad);
evas_object_show(ad->button);
ret = watch_time_get_current_time(&watch_time);
if (ret != APP_ERROR_NONE)
dlog_print(DLOG_ERROR, LOG_TAG, “failed to get current time. err = %d”, ret);
update_watch(ad, watch_time, 0);
watch_time_delete(watch_time);
/* Show window after base gui is set up */
evas_object_show(ad->win);
}
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio