ksoichiro / Android-ObservableScrollView

Android library to observe scroll events on scrollable views.
http://ksoichiro.github.io/Android-ObservableScrollView/
Apache License 2.0
9.65k stars 2.06k forks source link

java.lang.ClassCastException #254

Open cre8ivejp opened 8 years ago

cre8ivejp commented 8 years ago

I'm always getting this error when the activity is being recreated after it was destroyed by the OS. Anyone had the same problem?

Caused by: java.lang.ClassCastException: android.support.v7.widget.RecyclerView$SavedState cannot be cast to com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView$SavedState at com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView.onRestoreInstanceState(ObservableRecyclerView.java:73) at android.view.View.dispatchRestoreInstanceState(View.java:14752) at android.view.ViewGroup.dispatchThawSelfOnly(ViewGroup.java:3141) at android.support.v7.widget.RecyclerView.dispatchRestoreInstanceState(RecyclerView.java:1090) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3127) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3127) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3127) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3127) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3127) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3127) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3127) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3127) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3127) at android.view.View.restoreHierarchyState(View.java:14730) at com.android.internal.policy.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2035) at android.app.Activity.onRestoreInstanceState(Activity.java:1008)