Support both portrait and landscape