I’m using lvgl version 8.3.2,
How can I change correctly the color of label text during runtime? If I do as following, it works, but only for a certain time, then the program freezes:
phu, so should I always check first if the style is already the same, and only if NOT, add a new style.
I suppose that is not a problem to add multiple times a new style - but a problem if it is the same style?..
For changing the color (or other properties) of a single widget you can call lv_obj_set_style_local_text_color () with the appropriate parameters.
If you want to change a single property of an existing style, then just change the single property of that style and call lv_obj_invalidate (lv_scr_act ()) to force the update.