-
Notifications
You must be signed in to change notification settings - Fork 310
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
doJazzinessImpl NPE #37
Comments
I haven't been able to make a project specifically for this bug but after forking and putting in an npe catch with logging, it seems to iterate over position 3-9 when there are only 3 items currently. It seems to happen a lot more frequently when switching between lists with 1 view type to a list with 2 view types. |
Im getting exactly the same exception. Any news on this yet? |
Nope. Just had to copy the project and put in a try catch
|
Ok thx! I'll do that then. |
On 1.21 using recycler view
at com.twotoasters.jazzylistview.JazzyHelper.doJazzinessImpl(JazzyHelper.java:197)
at com.twotoasters.jazzylistview.JazzyHelper.doJazziness(JazzyHelper.java:189)
at com.twotoasters.jazzylistview.JazzyHelper.onScrolled(JazzyHelper.java:115)
at com.twotoasters.jazzylistview.recyclerview.JazzyRecyclerViewScrollListener.onScrolled(JazzyRecyclerViewScrollListener.java:24)
at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:2872)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:549)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
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:5221)
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:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
particularly
private void doJazzinessImpl(View item, int position, int scrollDirection) {
ViewPropertyAnimator animator = item.animate().setDuration(600L).setInterpolator(new AccelerateDecelerateInterpolator());
scrollDirection = scrollDirection > 0?1:-1;
this.mTransitionEffect.initView(item, position, scrollDirection);
this.mTransitionEffect.setupAnimation(item, position, scrollDirection, animator);
animator.start();
}
item is null. This happens pretty rarely. Basically what happens is I'm selecting a list of users on the left side of a sliding pane layout and clearing then adding to then notifyingdataSetChanged on a jazzylistview on the right side of the sliding pane layout. It may have something to do with there being two different view types in my listview, but I'm not sure. It seems like sometimes in onScrolled
indexBeforeLast is returning null.
Unless there is something wrong with the arithmetic to iterate through visible views my instinct is just to abort in doJazzinessImpl if item is null
The text was updated successfully, but these errors were encountered: