Added method to change layout in case of orientation changes