View: Added the 'No contents' when the app list is NULL 34/43334/1
authorHyojung Jo <hj903.jo@samsung.com>
Wed, 8 Jul 2015 06:51:31 +0000 (15:51 +0900)
committerHyojung Jo <hj903.jo@samsung.com>
Wed, 8 Jul 2015 06:51:31 +0000 (15:51 +0900)
Change-Id: I65c6b3ffe9e216926be618b01e314b5c79d04dc3
Signed-off-by: Hyojung Jo <hj903.jo@samsung.com>
include/define.h
res/view/base.edc
src/view/view_base.c

index 19b1abb86c12730d5c70a98a23ca69898c7bcc7e..b6c1e36ba718787c0667a69ca3ddc5cb29e30ca4 100644 (file)
@@ -34,6 +34,7 @@
 #define PART_SORT "part.sort"
 #define PART_GENGRID "part.gengrid"
 #define PART_APP_COUNT "part.app.count"
+#define PART_NO_CONTENTS "part.no.contents"
 
 /* Style */
 #define STYLE_MENU_BTN "style.menu.button"
@@ -56,6 +57,7 @@
 #define STR_MYAPPS "My Apps"
 #define STR_APPSTORE "App Store"
 #define STR_NULL "(NULL)"
+#define STR_NO_CONTENTS "No Contents"
 
 /* Count */
 #define MENU_COUNT 2
index 01a656473e18be79a5cff7a92e2f2848d09f8be5..9dc2d9db92ce99b4a1cdb6c3850dd543ab66f81b 100644 (file)
@@ -176,5 +176,54 @@ group {
                                }
                        }
                }
+
+               part {
+                       name, "padding.no.contents1";
+                       type, SPACER;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 0 318;
+                               rel2.relative, 0.0 0.0;
+                               align, 0.5 0.0;
+                               fixed, 0 1;
+                       }
+               }
+
+               part {
+                       name, "padding.no.contents2";
+                       type, SPACER;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 0 148;
+                               rel1.relative, 1.0 1.0;
+                               align, 0.5 1.0;
+                               fixed, 0 1;
+                       }
+               }
+
+               part {
+                       name, PART_NO_CONTENTS;
+                       type, TEXT;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               color, 0 0 0 178;
+                               rel1 {
+                                       to, "padding.no.contents1";
+                                       relative, 1.0 1.0;
+                               }
+                               rel2 {
+                                       to, "padding.no.contents2";
+                                       relative, 0.0 0.0;
+                               }
+                               text {
+                                       font, FONT_TIZENSANS_LIGHT;
+                                       size, 32;
+                                       align, 0.5 0.5;
+                               }
+                       }
+               }
        }
 }
index b3341023f812f35369b0175acc4bd66d8e48de7c..e57f54662728f9e23a642fd7c86c13d8863825ac 100644 (file)
@@ -337,7 +337,8 @@ static bool _draw_myapps_grid(struct _priv *priv)
 
        priv->app_list = get_app_list();
        if (!priv->app_list) {
-               /* 'No contents' should be displayed. */
+               elm_object_part_text_set(priv->base, PART_NO_CONTENTS,
+                               STR_NO_CONTENTS);
                return true;
        }