IllegalArgumentException: invalid state class

For Activity, I have two different layout files for portrait and landscape orientation. Elements of one orientation are directly related to elements in a different orientation, except that they can be connected by the base class, but are not the same type, and they have the same identifier. For example:

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: " . ? , . .

+5
1
+10

All Articles