Scroll animation speed in tile view widget

Hi all.

I have created a multi-tile interface and it works correctly.
But when scrolling through tiles on the screen, the animation is a little annoying in its slowness.
Is it possible to reduce the time it takes for tiles to move across the screen or completely disable animation as in the standard screen changing process?

In the standard set of functions and variables, I did not find a way to control animation.

I’m using a 480x480 display panel with an ESP32S3

Thank you.


Have you tried something like this?

lv_scr_load_anim(*target, fademode, spd, delay, false);


lv_scr_load_anim(&ui_light_screen, LV_SCR_LOAD_ANIM_NONE, 0, 0, false);

Its a little difficult to tell how you are loading your screens without any code shown…

Thanks for the answer.
Your suggestion relates to animation of changing screens, but this is not my case.
I don’t reload screens. I operate tiles on the same screen.
We are talking about TILE animation. Not screens.


And these tiles use a sliding animation, which is impossible to configure in a public method.

It is possible to set up the animation of changing tiles in private code methods, but I would not want to change the library code itself and then edit everything manually again when updating.
Perhaps the library developers will read my post and simply add an animation control method to the new release.

Oh sorry, without any code to review it’s quite difficult to give any reasonable answer…

What code are you talking about?
I’m using standard code from the documentation examples.

Here’s just this code with three tiles.

#include "../../lv_examples.h"

 * Create a 2x2 tile view and allow scrolling only in an "L" shape.
 * Demonstrate scroll chaining with a long list that
 * scrolls the tile view when it can't be scrolled further.
void lv_example_tileview_1(void)
    lv_obj_t * tv = lv_tileview_create(lv_screen_active());

    /*Tile1: just a label*/
    lv_obj_t * tile1 = lv_tileview_add_tile(tv, 0, 0, LV_DIR_BOTTOM);
    lv_obj_t * label = lv_label_create(tile1);
    lv_label_set_text(label, "Scroll down");

    /*Tile2: a button*/
    lv_obj_t * tile2 = lv_tileview_add_tile(tv, 0, 1, LV_DIR_TOP | LV_DIR_RIGHT);

    lv_obj_t * btn = lv_button_create(tile2);

    label = lv_label_create(btn);
    lv_label_set_text(label, "Scroll up or right");

    lv_obj_set_size(btn, LV_SIZE_CONTENT, LV_SIZE_CONTENT);

    /*Tile3: a list*/
    lv_obj_t * tile3 = lv_tileview_add_tile(tv, 1, 1, LV_DIR_LEFT);
    lv_obj_t * list = lv_list_create(tile3);
    lv_obj_set_size(list, LV_PCT(100), LV_PCT(100));

    lv_list_add_button(list, NULL, "One");
    lv_list_add_button(list, NULL, "Two");
    lv_list_add_button(list, NULL, "Three");
    lv_list_add_button(list, NULL, "Four");
    lv_list_add_button(list, NULL, "Five");
    lv_list_add_button(list, NULL, "Six");
    lv_list_add_button(list, NULL, "Seven");
    lv_list_add_button(list, NULL, "Eight");
    lv_list_add_button(list, NULL, "Nine");
    lv_list_add_button(list, NULL, "Ten");



I have no problems with the code.
I would just like to remove the transition animation between tiles and make it instantaneous, without smooth sliding.

Do you mean to disable the animation or disable scrolling entirely?

Please read the documentation: Tile view (lv_tileview) — LVGL documentation
You can change the current tile in code and either disable the animation or make it quicker.

I’ve read this documentation many times.
Where did you find a method that allows you to disable only animation?

Why disable scrolling in tiles? This loses all meaning in them, and turns everything into a simple change of screens.

Can you just give me a link to the method?

Change tile

The Tile view can scroll to a tile with lv_tileview_set_tile(tileview, tile_obj, LV_ANIM_ON / OFF) or lv_tileview_set_tile_by_index(tileview, col_id, row_id, LV_ANIM_ON / OFF)

If you mean this method, then it does not work for manually swiping across the screen, but only for directly moving from event command.

That’s the function I meant.

As for speeding up the animation when swiping, I do not think it is possible. It seems to me that the tileview object uses scrolling and the snapping functionality of scrolling to “animate” moving between tiles. As far as I know there is no way to speed up the “snapping speed” so to speak.
You might try messing with the source code in scroll.c. There seems to be some defines for
scroll animation speed, namely:


You could try setting these to something shorter, or editing the code for snapping directly.

OK thanks.
This is exactly what I meant.
It is possible that the library code should have these methods.
I’ll certainly try your advice.
But perhaps the library developers will take my question into account and add a similar method to the public zone to correct the animation time and in the future, when updating, we will not have to hardcode it again.

P. S. Thank you again.
Yes, it worked.
I have set the constants to zero.


And this significantly speeded up the animation. Now scrolling tiles has become more comfortable for me.

1 Like