switch layout based on device orientation