Lv_roller strange behavior when clearing/adding CLICKABLE flag

Note that the background object is not required. You can crate the message box directly on lv_layer_top() and make only the message box hidden/visible, and layer top clickable/not clickable.

So you can create the message box only once at the beginning and make it non-hidden. This way only it’s area will be redrawn. LV_USE_REFR_DEBUG in lv_conf.h can help to visualize the redrawn areas.


It just came to my mind that there is not too hacky method to solce the redraw issue.

lv_disp_enable_invalidation(NULL, false);
...create objects, change properties...
lv_disp_enable_invalidation(NULL, true);
lv_obj_invalidate(some_obj); // invalidate what is really needed.
1 Like