Hi guys, I am facing this crash on tapping on the row item. Here logcat reference
java.lang.NullPointerException: Attempt to read from field 'android.animation.Animator examples.android.com.recyclerviewanimations.MainActivity$MyChangeAnimator$AnimatorInfo.overallAnim' on a null object reference
at examples.android.com.recyclerviewanimations.MainActivity$MyChangeAnimator.endAnimations(MainActivity.java:458)
at androidx.recyclerview.widget.RecyclerView.setItemAnimator(RecyclerView.java:3434)
at examples.android.com.recyclerviewanimations.MainActivity$1.onCheckedChanged(MainActivity.java:72)
at android.widget.CompoundButton.setChecked(CompoundButton.java:154)
at android.widget.CompoundButton.toggle(CompoundButton.java:113)
at android.widget.CompoundButton.performClick(CompoundButton.java:118)
at android.view.View$PerformClick.run(View.java:20006)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5280)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
Hi guys, I am facing this crash on tapping on the row item. Here logcat reference
java.lang.NullPointerException: Attempt to read from field 'android.animation.Animator examples.android.com.recyclerviewanimations.MainActivity$MyChangeAnimator$AnimatorInfo.overallAnim' on a null object reference at examples.android.com.recyclerviewanimations.MainActivity$MyChangeAnimator.endAnimations(MainActivity.java:458) at androidx.recyclerview.widget.RecyclerView.setItemAnimator(RecyclerView.java:3434) at examples.android.com.recyclerviewanimations.MainActivity$1.onCheckedChanged(MainActivity.java:72) at android.widget.CompoundButton.setChecked(CompoundButton.java:154) at android.widget.CompoundButton.toggle(CompoundButton.java:113) at android.widget.CompoundButton.performClick(CompoundButton.java:118) at android.view.View$PerformClick.run(View.java:20006) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5280) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)