Added portrait mode support for mobile devices