Closed joaodias closed 9 years ago
Can you post the exception with the NPE?
Thanks for answer @oli107. Here is the exception:
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: FATAL EXCEPTION: main
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: java.lang.NullPointerException
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at com.appyvet.rangebar.RangeBar.movePin(RangeBar.java:1426)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at com.appyvet.rangebar.RangeBar.onActionMove(RangeBar.java:1305)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at com.appyvet.rangebar.RangeBar.onTouchEvent(RangeBar.java:440)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.View.dispatchTouchEvent(View.java:7317)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2259)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2259)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2259)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2259)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2259)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2259)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2259)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2259)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2259)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2259)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2063)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1443)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.app.Activity.dispatchTouchEvent(Activity.java:2429)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.support.v7.internal.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.support.v7.internal.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2011)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.View.dispatchPointerEvent(View.java:7508)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3655)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3580)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4850)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4810)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4966)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:179)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:171)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:4934)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:4988)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:776)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:579)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:546)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:762)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:800)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:100)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.os.Looper.loop(Looper.java:194)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5434)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:525)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:834)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
10-29 13:30:45.091 14510-14510/meta.onme E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
Check you are using the latest version, this was fixed in v1.2 with a null check at line 1426
Hi, I'm using the rangeBar with a single value. I have a bar with 24 indexes and whenever the pin crosses the index 3 the application throws a NullPointerException. Anyone having the same problem? I already try to play with some xml properties but I still have the problem.
Below is my xml code: