When there are many lvgl roller elements, they cannot be aligned, or some roller objects do not display all the elements, or transition sliding

Important: unclear posts may not receive useful answers.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Be sure you have checked the FAQ and read the relevant part of the documentation.
  • If applicable use the Simulator to eliminate hardware related issues.

Delete this section if you read and applied the mentioned points.

Description

The current version of lvgl used is 8.3.7,
When there are many elements, some elements are not displayed at a certain value.

Modify LV_ROLLER_INF_PAGES is 3.

When there are only 10 elements, sliding up and down will stop the fingers. After releasing the fingers, the element will still slide down.
123

The 24+60+60 elements of time, minute, and second should be able to be displayed simultaneously, but it seems that there is something wrong that prevents them from displaying properly.
When sliding, it will also slide for a certain distance after stopping.

What MCU/Processor/Board and compiler are you using?

What LVGL version are you using?

8.3.7

What do you want to achieve?

What have you tried so far?

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*/

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

Hello,

This might have to do with the LARGE_COORD setting in lv_conf.h. Try setting LV_USE_LARGE_COORD to 1 in lv_conf.h .

hello,
After slowly sliding the roller to a stop and then releasing the finger, the roller will still rotate. What is the problem.

Could you send a video about it?

Originally, 11 was slid to the selected section, but the roller did not stop and continued scrolling forward, resulting in a final value of 8.
Sometimes it is slow to slide 11 to the middle position, but when it is slightly up or down, 11 will not automatically return to the middle, but will scroll to the upper or lower grid.
1234
I originally slid to 3, but I continued to scroll one grid.
12345

Can you send me a code snippet to create a single roller? It can be either an issue in the roller or in your touch pad driver.

    const char* lvApp_Time00_23Roller = "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23";
    const char* lvApp_Time00_59Roller = 
    "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n\
    10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n\
    20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n\
    30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n\
    40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n\
    50\n51\n52\n53\n54\n55\n56\n57\n58\n59";


    lv_obj_t *mbx = lv_obj_create(lv_scr_act());

    lv_obj_set_style_border_width(mbx, 0, LV_PART_MAIN);
    lv_obj_set_style_radius(mbx, 0, LV_PART_MAIN);
    lv_obj_move_foreground(mbx);
    lv_obj_set_size(mbx, 480, 800);
    lv_obj_align(mbx, LV_ALIGN_CENTER, 0, 0);
    lv_obj_set_style_bg_color(mbx, lv_color_hex(0xFFCC80), LV_PART_MAIN);
    lv_obj_set_style_bg_opa(mbx, LV_OPA_100, LV_PART_MAIN);



    lv_obj_t* bhead = lv_label_create(mbx);
    lv_obj_align(bhead, LV_ALIGN_TOP_MID, 0, 25);
    lv_obj_set_style_text_font(bhead, font_Regular_26, LV_PART_MAIN);
    lv_obj_set_style_text_color(bhead, lv_color_hex(0x000000), LV_PART_MAIN);

    lv_label_set_text(bhead, "time");

    char buff[32];
    lv_obj_t* btime = lv_label_create(mbx);
    lv_obj_align(btime, LV_ALIGN_TOP_MID, 0, 67);
    lv_obj_set_style_text_font(btime, &lv_font_montserrat_26, LV_PART_MAIN);
    lv_obj_set_style_text_color(btime, lv_color_hex(0x000000), LV_PART_MAIN);
    lv_snprintf(buff, 32, "%02d:%02d:%02d",12,12,12);
    lv_label_set_text(btime, buff);

    rollerL = lv_roller_create(mbx);
    lv_obj_align(rollerL, LV_ALIGN_TOP_MID, -129, 116);
    lv_roller_set_options(rollerL, lvApp_Time00_23Roller, LV_ROLLER_MODE_INFINITE);

    lv_obj_set_style_border_width(rollerL, 10, LV_PART_SELECTED);
    lv_obj_set_style_border_side(rollerL, LV_BORDER_SIDE_LEFT, LV_PART_SELECTED);
    lv_obj_set_style_border_color(rollerL, lv_color_hex(0x000000), LV_PART_SELECTED);

    lv_obj_set_style_text_font(rollerL, &lv_font_montserrat_26, LV_PART_MAIN);
    lv_obj_set_style_text_color(rollerL, lv_color_hex(0x7F7F7F), LV_PART_MAIN);
    lv_obj_set_style_bg_color(rollerL, lv_color_hex(0xE6E6E6), LV_PART_MAIN);
    lv_obj_set_style_text_font(rollerL, &lv_font_montserrat_26, LV_PART_SELECTED);
    lv_obj_set_style_text_color(rollerL, lv_color_hex(0xFFCC80), LV_PART_SELECTED);
    lv_obj_set_style_bg_color(rollerL, lv_color_hex(0xFFFFFF), LV_PART_SELECTED);
    lv_obj_set_style_border_width(rollerL, 0, LV_PART_MAIN);
    lv_obj_set_style_radius(rollerL, 0, LV_PART_MAIN);
    lv_obj_set_style_text_line_space(rollerL, 60, LV_PART_MAIN);
    lv_obj_set_style_text_line_space(rollerL, 60, LV_PART_SELECTED);
    lv_obj_set_style_border_width(rollerL, 0, LV_PART_MAIN | LV_STATE_FOCUS_KEY);
    lv_obj_set_style_outline_width(rollerL, 0, LV_PART_MAIN | LV_STATE_FOCUS_KEY);
    // lv_obj_add_event_cb(rollerL, time_roller_event_cb, LV_EVENT_ALL, NULL);
   
    lv_obj_set_size(rollerL, 129, 450);

    rollerM = lv_roller_create(mbx);
    lv_obj_align(rollerM, LV_ALIGN_TOP_MID, 0, 116);
    lv_roller_set_options(rollerM, lvApp_Time00_59Roller, LV_ROLLER_MODE_INFINITE);
    lv_obj_set_style_text_font(rollerM, &lv_font_montserrat_26, LV_PART_MAIN);
    lv_obj_set_style_text_color(rollerM, lv_color_hex(0x7F7F7F), LV_PART_MAIN);
    lv_obj_set_style_bg_color(rollerM, lv_color_hex(0xE6E6E6), LV_PART_MAIN);
    lv_obj_set_style_text_font(rollerM, &lv_font_montserrat_26, LV_PART_SELECTED);
    lv_obj_set_style_text_color(rollerM, lv_color_hex(0xFFCC80), LV_PART_SELECTED);
    lv_obj_set_style_bg_color(rollerM, lv_color_hex(0xFFFFFF), LV_PART_SELECTED);
    lv_obj_set_style_border_width(rollerM, 0, LV_PART_MAIN);
    lv_obj_set_style_radius(rollerM, 0, LV_PART_MAIN);
    lv_obj_set_style_text_line_space(rollerM, 60, LV_PART_MAIN);
     lv_obj_set_style_text_line_space(rollerM, 60, LV_PART_SELECTED);
    lv_obj_set_style_border_width(rollerM, 0, LV_PART_MAIN | LV_STATE_FOCUS_KEY);
    lv_obj_set_style_outline_width(rollerM, 0, LV_PART_MAIN | LV_STATE_FOCUS_KEY);
    lv_obj_add_event_cb(rollerM, time_roller_event_cb, LV_EVENT_ALL, NULL);
    lv_obj_set_size(rollerM, 129, 450);

    rollerR = lv_roller_create(mbx);
    
    lv_roller_set_options(rollerR, lvApp_Time00_59Roller, LV_ROLLER_MODE_INFINITE);
    lv_obj_align(rollerR, LV_ALIGN_TOP_MID, 129, 116);
  
    lv_obj_set_style_text_font(rollerR, &lv_font_montserrat_26, LV_PART_MAIN);
    lv_obj_set_style_text_color(rollerR, lv_color_hex(0x7F7F7F), LV_PART_MAIN);
    lv_obj_set_style_bg_color(rollerR, lv_color_hex(0xE6E6E6), LV_PART_MAIN);
    lv_obj_set_style_text_font(rollerR, &lv_font_montserrat_26, LV_PART_SELECTED);
    lv_obj_set_style_text_color(rollerR, lv_color_hex(0xFFCC80), LV_PART_SELECTED);
    lv_obj_set_style_bg_color(rollerR, lv_color_hex(0xFFFFFF), LV_PART_SELECTED);
    lv_obj_set_style_border_width(rollerR, 0, LV_PART_MAIN);
    lv_obj_set_style_radius(rollerR, 0, LV_PART_MAIN);
    lv_obj_set_style_text_line_space(rollerR, 60, LV_PART_MAIN);
    lv_obj_set_style_text_line_space(rollerR, 60, LV_PART_SELECTED);
    lv_obj_set_style_border_width(rollerR, 0, LV_PART_MAIN | LV_STATE_FOCUS_KEY);
    lv_obj_set_style_outline_width(rollerR, 0, LV_PART_MAIN | LV_STATE_FOCUS_KEY);
    lv_obj_add_event_cb(rollerR, time_roller_event_cb, LV_EVENT_ALL, NULL);
      lv_obj_set_size(rollerR, 129, 450);


  
    lv_roller_set_selected(rollerL, 12, LV_ANIM_OFF);
    lv_roller_set_selected(rollerM,12, LV_ANIM_OFF);
    lv_roller_set_selected(rollerR, 12, LV_ANIM_OFF);



    lv_obj_t* labelL = lv_label_create(mbx);
    lv_obj_align(labelL, LV_ALIGN_TOP_LEFT, 115, 340);
    lv_obj_set_style_text_font(labelL, font_Regular_15, LV_PART_MAIN);
    lv_obj_set_style_text_color(labelL, lv_color_hex(0xFFCC80), LV_PART_MAIN);



    lv_obj_t* labelM = lv_label_create(mbx);
    lv_obj_align(labelM, LV_ALIGN_TOP_LEFT, 115 + 129, 340);
    lv_obj_set_style_text_font(labelM, font_Regular_15, LV_PART_MAIN);
    lv_obj_set_style_text_color(labelM, lv_color_hex(0xFFCC80), LV_PART_MAIN);



    lv_obj_t* labelR = lv_label_create(mbx);
    lv_obj_align(labelR, LV_ALIGN_TOP_LEFT, 115 + 129 + 129, 340);
    lv_obj_set_style_text_font(labelR, font_Regular_15, LV_PART_MAIN);
    lv_obj_set_style_text_color(labelR, lv_color_hex(0xFFCC80), LV_PART_MAIN);
   

 
    lv_label_set_text(labelL, "Hr");
    lv_label_set_text(labelM, "Min");
    lv_label_set_text(labelR, "Sec");
    


I met the same issue. when enlarging the KSAN_MSGQ_COUNT in v8.2 ,it seems better. guess it was caused by missing quick event by small kscan meg queue.

CONFIG_LV_Z_POINTER_KSCAN_MSGQ_COUNT=80