miguelhincapie/CustomBottomSheetBehavior

Use in Kotlin has an error

monxarat opened this issue · 0 comments

I have used this component in Kotlin code. The below errors have occurred.

2020-02-15 15:27:06.474 29388-29388/com.keki.mgr E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.keki.mgr, PID: 29388
    java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.customview.widget.ViewDragHelper.processTouchEvent(android.view.MotionEvent)' on a null object reference
        at com.mahc.custombottomsheetbehavior.BottomSheetBehaviorGoogleMapsLike.onTouchEvent(BottomSheetBehaviorGoogleMapsLike.java:288)
        at androidx.coordinatorlayout.widget.CoordinatorLayout.resetTouchBehaviors(CoordinatorLayout.java:424)
        at androidx.coordinatorlayout.widget.CoordinatorLayout.onAttachedToWindow(CoordinatorLayout.java:265)
        at android.view.View.dispatchAttachedToWindow(View.java:20105)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3430)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3437)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3437)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3437)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3437)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3437)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2052)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1745)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7768)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:967)
        at android.view.Choreographer.doCallbacks(Choreographer.java:791)
        at android.view.Choreographer.doFrame(Choreographer.java:726)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)