Description
Changing Roller contents on screen_load_start event
What MCU/Processor/Board and compiler are you using?
Esp32S3
What do you want to achieve?
I want to have the contents from a Roller widget to be dinamically loaded. Source is what I have in my SD card (folders’ names).
What have you tried so far?
I tried adding the “call funtion” upon “screen_load_start” event. Inside said function I tried changing the Options from the Roller. The function is called
Code to reproduce
//from ui.c
void ui_event_Screen2(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
lv_obj_t * target = lv_event_get_target(e);
if(event_code == LV_EVENT_GESTURE && lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_RIGHT) {
_ui_screen_change(ui_Screen1, LV_SCR_LOAD_ANIM_OVER_RIGHT, 250, 0);
}
if(event_code == LV_EVENT_SCREEN_LOAD_START) {
DIR(e);
}
}
//from ui_events.c
void DIR(lv_event_t * e)
{
//lv_roller_set_options(ui_Roller2, "Option TEST_01\nOption TEST_02\nOption TEST_03", LV_ROLLER_MODE_NORMAL);
}