FlexibleAdapter
FlexibleAdapter copied to clipboard
Classcastexception with stickyHeader
The stacktrace
java.lang.ClassCastException:
at android.support.v7.widget.RecyclerView.getChildViewHolderInt (RecyclerView.java:4497)
at android.support.v7.widget.RecyclerView.removeAnimatingView (RecyclerView.java:1373)
at android.support.v7.widget.RecyclerView$ItemAnimatorRestoreListener.onAnimationFinished (RecyclerView.java:12242)
at android.support.v7.widget.RecyclerView$ItemAnimator.dispatchAnimationFinished (RecyclerView.java:12742)
at android.support.v7.widget.SimpleItemAnimator.dispatchAddFinished (SimpleItemAnimator.java:303)
at android.support.v7.widget.DefaultItemAnimator$5.onAnimationEnd (DefaultItemAnimator.java:247)
at android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd (ViewPropertyAnimator.java:1122)
at android.animation.Animator$AnimatorListener.onAnimationEnd (Animator.java:552)
at android.animation.ValueAnimator.endAnimation (ValueAnimator.java:1209)
at android.animation.ValueAnimator.doAnimationFrame (ValueAnimator.java:1449)
at android.animation.AnimationHandler.doAnimationFrame (AnimationHandler.java:146)
at android.animation.AnimationHandler.-wrap2 (Unknown Source)
at android.animation.AnimationHandler$1.doFrame (AnimationHandler.java:54)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:909)
at android.view.Choreographer.doCallbacks (Choreographer.java:723)
at android.view.Choreographer.doFrame (Choreographer.java:655)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:897)
at android.os.Handler.handleCallback (Handler.java:789)
at android.os.Handler.dispatchMessage (Handler.java:98)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6938)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
I am not able to reproduce it, it from the play store console.
Apparently it is due to casting of childLayoutParams to recyclerview LayoutParam.
Items are added and removed dynamically based on callbacks. Item addition and removal are done using recyclerview.post(Runnable)
@saipsa, insufficient information.
@davideas you can tell me what more information is needed, I will provide if I can.
Also, I have found exact same issue which was reported earlier https://github.com/davideas/FlexibleAdapter/issues/78