farbodsz / FlashcardsApp

A simple, functional flashcards app that follows exam board specifications.
Apache License 2.0
0 stars 2 forks source link

IllegalArgumentException when rotating device sometimes #20

Open farbodsz opened 8 years ago

farbodsz commented 8 years ago

Sometimes when rotating the device, the following error occurs:

java.lang.IllegalArgumentException in android.view.View.onRestoreInstanceState

java.lang.RuntimeException: Unable to start activity 
  ComponentInfo{com.satsuware.flashcards/com.satsumasoftware.flashcards.ui.TopicDetailActivity}: 
  java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.support.v4.widget.NestedScrollView$SavedState instead. 
  This usually happens when two views of different type have the same id in the same hierarchy. 
  This view's id is id/viewGroup_options. Make sure other views do not use the same id.
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2702)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
    at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4471)

    ...

Caused by: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class ... 
  Make sure other views do not use the same id.
    at android.view.View.onRestoreInstanceState(View.java:14736)

        ...