platform.screen.mainScreen.widthDIPs and platform.screen.mainScreen.heightDIPs are read only once when the module is loaded and then cached forever. When the orientation of the device changes they need to be invalidated so the correct ones could be read again.