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