1 #include "../../lv_examples.h" 2 #if LV_BUILD_EXAMPLES 3 #if LV_USE_RLOTTIE 4 5 /** 6 * Load an lottie animation from file 7 */ lv_example_rlottie_2(void)8void lv_example_rlottie_2(void) 9 { 10 /*The rlottie library uses STDIO file API, so there is no driver letter for LVGL*/ 11 lv_obj_t * lottie = lv_rlottie_create_from_file(lv_scr_act(), 100, 100, 12 "lvgl/examples/libs/rlottie/lv_example_rlottie_approve.json"); 13 lv_obj_center(lottie); 14 } 15 16 #else lv_example_rlottie_2(void)17void lv_example_rlottie_2(void) 18 { 19 /*TODO 20 *fallback for online examples*/ 21 22 lv_obj_t * label = lv_label_create(lv_scr_act()); 23 lv_label_set_text(label, "Rlottie is not installed"); 24 lv_obj_center(label); 25 } 26 27 #endif 28 #endif 29