#define MAX_TITLE_NAME 128
#define NORMAL_TIMEOUT_VALUE 0.01
#define EXTENDED_TIMEOUT_VALUE 0.2
+#define CLEAR_IMAGE_SIZE 15
#define sncat(to, size, from) \
({strncat((to), (from), ((size) - strlen(to) - 1)); })
elm_object_part_content_set(searchbar_layout, "entry_part", ad->searchbar_rect);
/* clear button */
- ad->searchbar_button = elm_button_add(ad->searchbar_rect);
- elm_object_style_set(ad->searchbar_button, "editfield_clear");
+ if (_COMMON) {
+ ad->searchbar_button = elm_button_add(ad->searchbar_rect);
+ Evas_Object *img = elm_image_add(ad->searchbar_button);
+ char buffer[1024] = {0,};
+ char *path = app_get_resource_path();
+ snprintf(buffer, 1024, "%s%s%s", path, "images/", "btn_controller_close.png");
+ elm_image_file_set(img, buffer, NULL);
+ if (path) {
+ free(path);
+ }
+ evas_object_size_hint_max_set(img, CLEAR_IMAGE_SIZE, CLEAR_IMAGE_SIZE);
+ elm_object_part_content_set(ad->searchbar_button, "elm.swallow.content", img);
+ elm_object_style_set(ad->searchbar_button, "focus");
+ evas_object_show(ad->searchbar_button);
+ } else {
+ ad->searchbar_button = elm_button_add(ad->searchbar_rect);
+ elm_object_style_set(ad->searchbar_button, "editfield_clear");
+ }
+
evas_object_smart_callback_add(ad->searchbar_button, "clicked", _searchbar_clear_button_clicked_cb, ad->searchbar_entry);
elm_object_part_content_set(ad->searchbar_rect, "elm.swallow.button", ad->searchbar_button);
- /* current city button */
Evas_Object *location_btn = elm_button_add(searchbar_layout);
elm_object_style_set(location_btn, "transparent");
Evas_Object *location_icon = elm_layout_add(location_btn);