NullPointerException
Closed this issue · 1 comments
Hi,
I got a NullPointerException:
mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
LinearLayoutManager llm = new LinearLayoutManager(getActivity());
mRecyclerView.setLayoutManager(llm);
mMaterialScrollBar = new DragScrollBar(getActivity(), mRecyclerView, true);
mMaterialScrollBar.setHandleColourRes(R.color.main_green);
java.lang.NullPointerException: Attempt to read from field 'float android.graphics.RectF.left' on a null object reference
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.graphics.Canvas.drawArc(Canvas.java:1197)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at com.turingtechnologies.materialscrollbar.Handle.onDraw(Handle.java:81)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:16184)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15180)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15175)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:16187)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15180)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15175)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15175)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15175)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15175)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.support.design.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1077)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:16187)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15180)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.support.v4.widget.DrawerLayout.drawChild(DrawerLayout.java:1229)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15175)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15175)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15175)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15175)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15175)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:15954)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.draw(View.java:16187)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at com.android.internal.policy.PhoneWindow$DecorView.draw(PhoneWindow.java:2690)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15180)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:281)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:287)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:322)
01-26 17:42:37.950 17845-17845/com.swapcard.apps.android E/AndroidRuntime: at android.view.ViewRootImpl.draw(ViewRootImpl.java:2615)
Fixed, I think that was related to the SwipeRefreshLayout