I have added a switch to turn my LCD off and on.
and I check for its status with a pin at the esp32, to reinitialize the LCD and touch drivers.
but the screen stills black till I touch many parts of it.
How can I redraw all of the screen’s contents?
What have you tried so far?
lv_tabview_set_tab_act(tv, 0, LV_ANIM_ON);
but it isn’t enough the rest of the tap bar is still black tell I touch it.
when lcd off you deinit the lcd hardware,after you switch it on,the drive already lost its content in its ram.so you need to resend all the screen data to the driver.
Actually I don’t deinit the lvgl display.
Nor the spi driver.
I just reinit the lcd and touch drivers, after they got repowered.
So the screen is containing the same display.
Just wanted to refresh it once.
To redraw them
You reinit the lcd,the ram content in it is already gone.I know you didn’t deinit the lvgl and spi,but you deinit the lcd hardware driver,it has the screen data in it, lvgl just send the changed screen data to it.
So if you want all the screen to show right,you need to send screen data to it after reinit lcd hardware driver.