Changing application theme
This code snippet shows how to change application themes. Each theme has to be defined in a separate .edc file (here theme_day.edc and theme_night.edc). For more information on creating these files refer to: https://developer.tizen.org/community/code-snippet/native-code-snippet/custom-elmbutton .
//themes definition
typedef enum {
DAY, NIGHT
} themes;
//choosing theme
void set_theme(themes theme, appdata_s* ad) {
char theme_edj_path[PATH_MAX] = { 0, };
app_get_resource(EDJ_FILE, edj_path, (int) PATH_MAX);
if (theme == DAY) {
app_get_resource("edje/theme_day.edj", theme_edj_path, (int) PATH_MAX);
} else {
app_get_resource("edje/theme_night.edj", theme_edj_path, (int) PATH_MAX);
}
elm_theme_overlay_add(NULL, theme_edj_path);
}