Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classcastexception with stickyHeader #640

Closed
saipsa opened this issue Jul 25, 2018 · 2 comments
Closed

Classcastexception with stickyHeader #640

saipsa opened this issue Jul 25, 2018 · 2 comments
Labels

Comments

@saipsa
Copy link

saipsa commented Jul 25, 2018

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)

@davideas
Copy link
Owner

@saipsa, insufficient information.

@saipsa
Copy link
Author

saipsa commented Jul 26, 2018

@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 #78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants