This is a simple piece of code to check the orientation of the screen at runtime