Option to disable scroll animation on when using SCROLL_ON_FOCUS flag

Description

Is there any way to disable scroll animation when using SCROLL_ON_FOCUS flag? I am designing an interface to a low-powered MCU and we aren’t expecting any animation in the UI.
I am using a list and lv_group_focus_next/prev functions to alternate between the objects, so LV_OBJ_FLAG_SCROLL_ON_FOCUS is set. I didn’t found any way to disable animation when scrolling it, and would like to know if there is. Any suggestion of alternative methods to achieve what I want would also be welcomed.

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

Currently eclipse simulator

What have you tried so far?

I’ve found Scroll on focus without animation - Issue #2342 on GitHub but it didn’t help.

I found that the following code at line ~780 in file lv_obj.c:

    else if(code == LV_EVENT_FOCUSED) {
        if(lv_obj_has_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS)) {
            lv_obj_scroll_to_view_recursive(obj, LV_ANIM_ON);
        }

when changed to

           lv_obj_scroll_to_view_recursive(obj, LV_ANIM_OFF);

fixes my problem, but I do not want to change LVGL library code.

1 Like

Any updates on it?