[tileview] don't have LV_EVENT_VALUE_CHANGED when i use "lv_obj_set_tile_id" whithout anim sometimes


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

simulator vs2019

What LVGL version are you using?


What do you want to achieve?

i want to change tile use button

What have you tried so far?

Code to reproduce

The code block(s) should be formatted like:

/*You code here*/

Screenshot and/or video

When I use “lv_obj_Set_tile_id” to change a tile without animation, (switching from right to left), it doesn’t produce LV_EVENT_VALUE_CHANGED, but tiles can switch successfully and objects on the new page can respond normally. This only happened in my commercial project. The tiles behaved normally when I did the tests and any help to find out the cause of this problem would be greatly appreciated.

LVGL doesn’t send VALUE_CHANGED events if you change something manually (i.e. from code). The event is fired only if the user makes some changes.

but why did it send this EVENT when i use LV_ANIM_ON

Ah, I see the problem. There shouldn’t be VALUE_CHANGED event with animation eihter, so we can consider it as a bug.

Is it a serious issue in your case?

At present, I have used other methods to circumvent this problem, but I don’t know if this will bring other effects. I think I need to describe this problem again, which only arises if the following three conditions are met:
1: only existed in one of my commercial projects,
2: switched from tile on the right to tile on the left
3: using LV_ANIM_OFF
I tried to set up a test project to find out the problem and it didn’t reproduce, so it was very confusing for me

It’s really strange. I’ve just set up GitHub Codespace for LVGL. It’s totally plain and neutral environment that you can set up in 2 minutes right in your browser. See the details here. Could you try it out there?