blazsolar / HorizontalPicker

Android widget allowing user to select one item from set of them by swiping left and right.
http://blaz.solar/HorizontalPicker
Apache License 2.0
227 stars 81 forks source link

FATAL EXCEPTION while setting overScrollMode=never #61

Open SatishGhuge opened 7 years ago

SatishGhuge commented 7 years ago

Hi, I am using this library, and I don't want to show edges. So I am setting "overScrollMode = never". But app getting crashed. Please refer following logs.

Thanks.

E/AndroidRuntime: FATAL EXCEPTION: main java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EdgeEffect.onPull(float)' on a null object reference at com.wefika.horizontalpicker.HorizontalPicker.onTouchEvent(HorizontalPicker.java:495) at android.view.View.dispatchTouchEvent(View.java:9994) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.widget.ScrollView.dispatchTouchEvent(ScrollView.java:645) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2841) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2516) at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2823) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1848) at android.app.Activity.dispatchTouchEvent(Activity.java:3047) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71) at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2784) at android.view.View.dispatchPointerEvent(View.java:10229) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5357) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5193) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4633) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4686) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4652) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4794) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4660) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4851) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4633) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4686) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4652) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4660) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4633) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7330) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7208) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7169) at android.view