I know that I can create a folder called layout-land in my res/ folder and Android will handle this automatically. My problem is what if I want to call a new Activity when my orientation changes from portait to landscape?

What I have:

* An xml file for portrait that consists of a button and a scrollview
* An xml file for landscape that contains multiple buttons, textviews,
and edittexts
* Both are called main.xml (but in their respective folders)
* One Activity that calls setContentView(main.xml)

This activity however has to initialize all the buttons, textviews, etc, but when I change the orientation back to portrait, it force closes because those buttons are not in that xml file!

How can I get around this?