Description
Is there a limit on the lvgl roller for having options? I am trying to put 60 options on a singular roller and it seems to be crashing, but works fine when the roller options are reduced. Just wished to try out a way to input hour and minute options on the roller for my small lvgl project (novice).
What MCU/Processor/Board and compiler are you using?
ESP32 WROOM
What LVGL version are you using?
8.3.4
What do you want to achieve?
Wanted to know the upper limit of the roller.
What have you tried so far?
I have looked at the documentation but did not seem to find a specific number. I have tried and put a smaller number of options, the maximum that I was able to make it run with was 24 options.
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
void create_rollers(lv_obj_t* act_scr){
const char* roller_opt = "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n";
lv_obj_t* t1 = lv_roller_create(lv_scr_act());
lv_obj_add_style(t1, &time_roller_style, 0);
lv_obj_set_style_bg_opa(t1, LV_OPA_TRANSP, LV_PART_SELECTED);
lv_roller_set_options(t1, roller_opt,LV_ROLLER_MODE_INFINITE);
lv_roller_set_visible_row_count(t1, 3);
lv_obj_align(minute_time_roller, LV_ALIGN_CENTER, 40, 0);
lv_obj_add_event_cb(t1, NULL, LV_EVENT_ALL, NULL);
}
Thanks in advance!