Programmatically changing layout based on device screen size