View: Draw the count of apps on the bottom area 83/42783/1
authorHyojung Jo <hj903.jo@samsung.com>
Thu, 2 Jul 2015 08:16:44 +0000 (17:16 +0900)
committerHyojung Jo <hj903.jo@samsung.com>
Thu, 2 Jul 2015 08:16:44 +0000 (17:16 +0900)
Change-Id: I86d838873b5d7936deb77cb604cb297ffb481433
Signed-off-by: Hyojung Jo <hj903.jo@samsung.com>
include/define.h
res/view/base.edc
src/view/view_base.c

index ec593be92a7b1e92f7e14c0eaf8b6e13693bb0c9..c8a2af861262d1be9b409e114c5f26e294b1dd3b 100644 (file)
@@ -33,6 +33,7 @@
 #define PART_MENU "part.menu"
 #define PART_SORT "part.sort"
 #define PART_GENGRID "part.gengrid"
+#define PART_APP_COUNT "part.app.count"
 
 /* Style */
 #define STYLE_MENU_BTN "style.menu.button"
@@ -54,5 +55,6 @@
 /* Size */
 #define SIZE_GRID_WIDTH (212+26)
 #define SIZE_GRID_HEIGHT (294+26)
+#define SIZE_STR 1024
 
 #endif /* __AIR_APPS_DEFINE_H__ */
index 29afdc165867fdfe22f3839f318125030b0be282..01a656473e18be79a5cff7a92e2f2848d09f8be5 100644 (file)
@@ -136,5 +136,45 @@ group {
                                }
                        }
                }
+
+               part {
+                       name, "padding.app.count";
+                       type, SPACER;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 62 148;
+                               rel1.relative, 0.0 1.0;
+                               rel2.relative, 0.0 1.0;
+                               align, 0.0 1.0;
+                               fixed, 1 1;
+                       }
+               }
+
+               part {
+                       name, PART_APP_COUNT;
+                       type, TEXT;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               color, 77 77 77 255;
+                               min, 1184 148;
+                               rel1 {
+                                       to, "padding.app.count";
+                                       relative, 1.0 0.0;
+                               }
+                               rel2 {
+                                       to, "padding.app.count";
+                                       relative, 1.0 0.0;
+                               }
+                               align, 0.0 0.0;
+                               fixed, 1 1;
+                               text {
+                                       font, FONT_TIZENSANS_LIGHT;
+                                       size, 28;
+                                       align, 0.0 0.5;
+                               }
+                       }
+               }
        }
 }
index 751d7c1e3da1f4435296149ba544687c4b5b3afa..cac01d6cccaf28917f8d5328cb3ac8ba21b0465c 100644 (file)
@@ -69,6 +69,8 @@ static input_handler _sort_input_handler = {
 static bool _draw_myapps_grid(struct _priv *priv)
 {
        Eina_List *l = NULL;
+       char str[SIZE_STR];
+       int c;
 
        if (!priv || !priv->gmgr || !priv->base || !priv->grid) {
                _ERR("Invalid argument.");
@@ -93,6 +95,10 @@ static bool _draw_myapps_grid(struct _priv *priv)
 
        elm_object_part_content_set(priv->base, PART_GENGRID, priv->grid);
 
+       c = eina_list_count(l);
+       snprintf(str, sizeof(str), " %d "STR_APPS, c);
+       elm_object_part_text_set(priv->base, PART_APP_COUNT, str);
+
        return true;
 }