Fix the guild-text overlapping issue in search entry.(like N_SE-8523)
authorKairong Yin <kairong78.yin@samsung.com>
Mon, 3 Sep 2012 06:14:06 +0000 (23:14 -0700)
committerKairong Yin <kairong78.yin@samsung.com>
Mon, 3 Sep 2012 06:28:55 +0000 (23:28 -0700)
Change-Id: I2bb19db80b6e8fcd6fd001b8c187c1297833f9e0

setting-common/src/setting-common-draw-searchbar.c

index 2b0ffc6..1b432bd 100755 (executable)
@@ -67,6 +67,11 @@ static void __searchbar_chg_cb(void *data, Evas_Object *obj, void *event_info)
                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)
@@ -142,6 +147,7 @@ Evas_Object *setting_create_searchbar(void *data, Evas_Object *parent,
        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);