Search code examples
androideclipseandroid-layoutorientationcontent-assist

How to create different layout for different orientation in android?


I would like to have different activity.xml files for different orientations. I have created a another folder with name layout-land. When I copy and paste the activity_main.xml file into it, then screen size is automatically getting oriented to landscape.

But after doing this, code assist is not working. Its showing the following error when I press ctrl+s

Content assist not available at the current location

what is the reason for this? Did I do anything wrong for creating different layouts for both orientation?


Solution

  • This sounds like an IDE-specific issue more than anything. The way you're doing it is correct. Assuming you a layout with the same name in as the other inside of layout-land, you should be good to go. Just give it a whirl.