Question

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?

Était-ce utile?

La 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.

Autres conseils

Sounds like an Eclipse error to me (Googling "Content assist not available at the current location gives me a lot of hits); try running your application on a device and it will most likely work. It doesn't sound like you've done anything wrong.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top