Q:

Eclipse android java: Orientation

I have question about orientation. I started with an application for a phone. 
I just wonder if it is possible to make the layout in 2 different xml files. 
Currently I have the layout right for vertically but not horizontally. 
I wondered if it is possible to make two layouts files one for vertical and one for horizontal.
Thanks,

A:

Yes It is possible..You just have to put it under separate folders with different names depending on orientation and resolution, the device will automatically select the right one for its screen settings
More info here:
http://developer.android.com/guide/practices/screens_support.html
http://developer.android.com/training/basics/supporting-devices/screens.html
Put them under "Resource directory qualifiers for screen size and density"
You will have to create two versions of xml files and put in layout-port and layout-land folder inside res folder.
eg :
res/layout-land [Landscape Mode]
main.xml 
res/layout-port [Portrait Mode ]
main.xml

