question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Indicator color changing method not working.

See original GitHub issue

In my activity, getting error on this line.

mController.setSelectedIndicatorColor(R.color.colorPrimary);

Error Log:

FATAL EXCEPTION: main
                                                                     Process: user.com.smartwashr, PID: 26838
                                                                     java.lang.RuntimeException: Unable to start activity ComponentInfo{user.com.smartwashr/user.com.smartwashr.activities.HowToActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void com.github.paolorotolo.appintro.IndicatorController.setSelectedIndicatorColor(int)' on a null object reference
                                                                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2572)
                                                                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
                                                                         at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
                                                                         at android.os.Handler.dispatchMessage(Handler.java:111)
                                                                         at android.os.Looper.loop(Looper.java:207)
                                                                         at android.app.ActivityThread.main(ActivityThread.java:5728)
                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
                                                                      Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void com.github.paolorotolo.appintro.IndicatorController.setSelectedIndicatorColor(int)' on a null object reference
                                                                         at user.com.smartwashr.activities.HowToActivity.onCreate(HowToActivity.java:54)
                                                                         at android.app.Activity.performCreate(Activity.java:6309)
                                                                         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
                                                                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)
                                                                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654) 
                                                                         at android.app.ActivityThread.-wrap11(ActivityThread.java) 
                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488) 
                                                                         at android.os.Handler.dispatchMessage(Handler.java:111) 
                                                                         at android.os.Looper.loop(Looper.java:207) 
                                                                         at android.app.ActivityThread.main(ActivityThread.java:5728) 
                                                                         at java.lang.reflect.Method.invoke(Native Method) 
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) 
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679) 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
zeeshansardar61commented, Jun 24, 2017

Thank you @paolorotolo for answer, @Almaral-Engineering try this , it helped me setIndicatorColor(getResources.getColor(R.id.blue), getResources.getColor(R.id.red));

0reactions
umang4846commented, Apr 2, 2019

setIndicatorColor(getResources().getColor(R.color.black),getResources().getColor(R.color.md_blue_grey_600;

Read more comments on GitHub >

github_iconTop Results From Across the Web

Indicator color changing method not working. #445 - GitHub
In my activity, getting error on this line. mController.setSelectedIndicatorColor(R.color.colorPrimary); Error Log: FATAL EXCEPTION: main ...
Read more >
How to change the new TabLayout indicator color and height
TabLayout , and found a problem, in the class definition, there are no methods to change the indicator color, and default height.
Read more >
pH and Color Change | Chapter 6 - Middle School Chemistry
Students will see a demonstration of a color change using universal pH indicator. Students will change the concentrations of an acid and a...
Read more >
Colour Change - Titration Indicators - YouTube
Colour Change - Titration Indicators. 5.5K views 1 year ago ... Solving Acid-Base Titration Problems ... Titration procedure (Step by step).
Read more >
RE: Problem with Changing the string indicator's text and color
I have a state machine with idle > test > report > idle flow. I need to set the front panel string as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found