android - Color.ParseColor() - NullPointerException -
android - Color.ParseColor() - NullPointerException - i have field declared: private string textcolor = "#ffefefef"; and in method is: tv.settextcolor(color.parsecolor(textcolor)); im getting nullpointerexception @ color.paresecolor(). do wrong? should work this. one of constructors resetting textcolor null when inflated xml , textcolor attribute missing. textcolor = attrs.getattributevalue("http://schemas.android.com/apk/res/com.incredible.fontmetrics", "textcolor"); android parsing colors nullpointerexception