Skip to content
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

Null pointer on draw method #1

Open
Dhrupal opened this issue Jun 30, 2016 · 0 comments
Open

Null pointer on draw method #1

Dhrupal opened this issue Jun 30, 2016 · 0 comments

Comments

@Dhrupal
Copy link

Dhrupal commented Jun 30, 2016

By using your code have nullpointer at following line

int recyclerViewBGColour = recyclerViewColour.getColor();

Log is:

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.drawable.ColorDrawable.getColor()' on a null object reference
at com.comtechtel.tcsconnect.view.customview.DividerDecoration.drawGradient(DividerDecoration.java:100)
at com.comtechtel.tcsconnect.view.customview.DividerDecoration.onDrawOver(DividerDecoration.java:69)
at android.support.v7.widget.RecyclerView.draw(RecyclerView.java:3294)
at android.view.View.updateDisplayListIfDirty(View.java:14999)
at android.view.View.getDisplayList(View.java:15022)
at android.view.View.draw(View.java:15789)
at android.view.ViewGroup.drawChild(ViewGroup.java:3678)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3472)
at android.view.View.updateDisplayListIfDirty(View.java:14994)
at android.view.View.getDisplayList(View.java:15022)
at android.view.View.draw(View.java:15789)
at android.view.ViewGroup.drawChild(ViewGroup.java:3678)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3472)
at android.view.View.draw(View.java:16071)
at android.widget.FrameLayout.draw(FrameLayout.java:592)
at android.support.v4.widget.NestedScrollView.draw(NestedScrollView.java:1761)
at android.view.View.updateDisplayListIfDirty(View.java:14999)
at android.view.View.getDisplayList(View.java:15022)
at android.view.View.draw(View.java:15789)
at android.view.ViewGroup.drawChild(ViewGroup.java:3678)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3472)
at android.view.View.draw(View.java:16071)
at android.view.View.updateDisplayListIfDirty(View.java:14999)
at android.view.View.getDisplayList(View.java:15022)
at android.view.View.draw(View.java:15789)
at android.view.ViewGroup.drawChild(ViewGroup.java:3678)
at android.support.design.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1127)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3472)
at android.view.View.draw(View.java:16071)
at android.view.View.updateDisplayListIfDirty(View.java:14999)
at android.view.View.getDisplayList(View.java:15022)
at android.view.View.draw(View.java:15789)
at android.view.ViewGroup.drawChild(ViewGroup.java:3678)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3472)
at android.view.View.updateDisplayListIfDirty(View.java:14994)
at android.view.View.getDisplayList(View.java:15022)
at android.view.View.draw(View.java:15789)
at android.view.ViewGroup.drawChild(ViewGroup.java:3678)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3472)
at android.view.View.updateDisplayListIfDirty(View.java:14994)
at android.view.View.getDisplayList(View.java:15022)
at android.view.View.draw(View.java:15789)
at android.view.ViewGroup.drawChild(ViewGroup.java:3678)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3472)
at android.view.View.updateDisplayListIfDirty(View.java:14994)
at android.view.View.getDisplayList(View.java:15022)
at android.view.View.draw(View.java:15789)
at android.view.ViewGroup.drawChild(ViewGroup.java:3678)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3472)
at android.view.View.updateDisplayListIfDirty(View.java:14994)
at android.view.View.getDisplayList(View.java:15022)
at android.view.View.draw(View.java:15789)
at android.view.ViewGroup.drawChild(ViewGroup.java:3678)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3472)
at android.view.View.draw(View.java:16071)
at android.widget.FrameLayout.draw(FrameLayout.java:592)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2916)
at android.view.View.updateDisplayListIfDirty(View.java:14999)
at android.view.View.getDisplayList(View.java:15022)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:275)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:281)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:320)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2741)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2573)
at

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant