You need a folder structure, for example:
res\layout\main.xml res\layout-land\main.xml
Each of these layouts should contain the same elements, but reorder, for example. if you have a button with android:id="@+id/button1" in the portrait landscape, you will need to give an equivalent button in landscape mode with the same name.
Scousechris
source share