Screen orientation change in runtime, like a smartphone

It has been taken care of with two functions lv_disp_drv_update(lv_disp, &lv_disp_drv) & lv_obj_invalidate(lv_scr_act()). There is also a dummy function in my code display_orientation_get() that accelerometer readings is returned for run time angle information. But there is a problem. I posted a follow-up thread at Screen rotation like a smartphone in runtime