Set FlatButton Text Color
Hitexroid opened this issue · comments
Sadeq commented
i write this code
button.setTextColor(Colors.White);
but returns
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setTextColor(int)' on a null object reference
wangfanforever commented
ButtonFlat.java at line 18 , delete this code TextView textButton;
and then this problem has been solve;
wangfanforever commented
子类变量名和父类变量名重复,父类的textButton没有初始化
Sadeq commented
Thank you so much.