For an Activity, I have two different layout files for portrait and landscape orientations. The elements of one orientation have direct relation to elements in the other orientation except that they may be related by base class but are not the exact same type and they do have the same id. So for instance:
layout/main_layout.xml:
...
<ListView
android:id="@+id/current_news_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
then in layout-land/main_layout.xml: CustomListView is a subclass of android.widget.AdapterView
...
<CustomListView
android:id="@+id/current_news_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
"IllegalArgumentException: Wrong state class" is thrown when changing orientations. Is this the expected behavior? I have not overridden configuration changing code and I'm letting the activity be completely destroyed and reconstructed. I've avoided other instances of having identical identifiers in the layout hierarchy at the same time.