else
elm_object_signal_emit(searchbar_layout, "elm,state,eraser,show", "elm");
}
+ if(safeStrLen(elm_entry_entry_get(obj)) > 0) {
+ elm_object_signal_emit(searchbar_layout, "elm,state,guidetext,hide", "elm");
+ } else {
+ elm_object_signal_emit(searchbar_layout, "elm,state,guidetext,show", "elm");
+ }
}
static void __searchbar_focused_cb(void *data, Evas_Object *obj, void *event_info)
Evas_Object *entry = elm_entry_add(searchbar_layout);
elm_entry_scrollable_set(entry, EINA_TRUE);
elm_entry_single_line_set(entry, EINA_TRUE);
+ elm_entry_prediction_allow_set(entry, EINA_FALSE);
if (change_cb) evas_object_smart_callback_add(entry, "changed", change_cb, data);
evas_object_smart_callback_add(entry, "changed", __searchbar_chg_cb, searchbar_layout);
evas_object_smart_callback_add(entry, "focused", __searchbar_focused_cb, searchbar_layout);