2021-10-22 15:44:43 +02:00
|
|
|
#include "../../lv_examples.h"
|
2021-11-29 14:54:37 +01:00
|
|
|
#if LV_BUILD_EXAMPLES
|
|
|
|
#if LV_USE_RLOTTIE
|
2021-10-22 15:44:43 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Load an lottie animation from file
|
|
|
|
*/
|
|
|
|
void lv_example_rlottie_2(void)
|
|
|
|
{
|
2022-01-17 14:10:23 +01:00
|
|
|
/*The rlottie library uses STDIO file API, so there is no driver letter for LVGL*/
|
2021-10-22 15:44:43 +02:00
|
|
|
lv_obj_t * lottie = lv_rlottie_create_from_file(lv_scr_act(), 100, 100,
|
2022-02-13 13:59:17 -05:00
|
|
|
"lvgl/examples/libs/rlottie/lv_example_rlottie_approve.json");
|
2021-10-22 15:44:43 +02:00
|
|
|
lv_obj_center(lottie);
|
|
|
|
}
|
|
|
|
|
2021-10-22 16:05:25 +02:00
|
|
|
#else
|
|
|
|
void lv_example_rlottie_2(void)
|
|
|
|
{
|
|
|
|
/*TODO
|
|
|
|
*fallback for online examples*/
|
|
|
|
|
|
|
|
lv_obj_t * label = lv_label_create(lv_scr_act());
|
|
|
|
lv_label_set_text(label, "Rlottie is not installed");
|
|
|
|
lv_obj_center(label);
|
|
|
|
}
|
|
|
|
|
2021-10-22 15:44:43 +02:00
|
|
|
#endif
|
2021-11-29 14:54:37 +01:00
|
|
|
#endif
|