Automatically update the interface when rotating the phone screen

Hi guys, Currently I am setting it to fit height and width according to the design size, every time I rotate the screen if the device is in rotation lock mode the interface will not be updated, I want it to be updated every time I rotate the screen