navasmdc / MaterialDesignLibrary

This is a library with components of Android L to you use in android 2.2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set FlatButton Text Color

Hitexroid opened this issue · comments

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

ButtonFlat.java at line 18 , delete this code TextView textButton;
and then this problem has been solve;

子类变量名和父类变量名重复,父类的textButton没有初始化

commented

Thank you so much.