Adding circular index to add applications view 40/75440/1
authorIrfan Abdul <irfan.abdul@samsung.com>
Sat, 18 Jun 2016 14:16:57 +0000 (19:46 +0530)
committerIrfan Abdul <irfan.abdul@samsung.com>
Sat, 18 Jun 2016 14:16:57 +0000 (19:46 +0530)
Change-Id: I54b0528805b88365ee9d0fa75ad4e43876bff880

apptray-widget-app/src/common/home_custom_index.c

index c3a599e3b80b53248f0e03967cfd4620843b39cf..cbfab899e444cc07568a279e86b32c7a1fe8b86b 100755 (executable)
@@ -35,8 +35,6 @@ typedef struct {
 
 #define INDEX_EVEN_ITEM_NUM 20
 #define INDEX_ODD_ITEM_NUM 19
-
-#if 0
 static const char *_index_style_get(int index, int even)
 {
        static const char g_it_style_odd[INDEX_ODD_ITEM_NUM][20] = {
@@ -94,7 +92,6 @@ static const char *_index_style_get(int index, int even)
                return g_it_style_odd[index];
        }
 }
-#endif
 
 
 HAPI void home_custom_index_bring_in_page(Evas_Object *index, Evas_Object *page)
@@ -203,6 +200,7 @@ static void _update_index(Evas_Object *scroller, Evas_Object *index, const Eina_
 {
        _ENTER;
        Evas_Object *page = NULL;
+       Elm_Object_Item *idx_it = NULL;
        const Eina_List *l = NULL;
 
        hc_index_info_s *index_info = NULL;
@@ -253,9 +251,8 @@ static void _update_index(Evas_Object *scroller, Evas_Object *index, const Eina_
                        }
 
                        cur_inserted++;
-
+                       idx_it = elm_index_item_append(index, NULL, NULL, (void *) index_number);
 #ifdef RUN_ON_DEVICE
-                       Elm_Object_Item *idx_it  = elm_index_item_append(index, NULL, NULL, (void *) index_number);
                        elm_object_item_style_set(idx_it, _index_style_get(style_base + index_number, style_even));
 #endif
                        index_number++;