由于你没有自己定义颜色,默认为灰色。
有两种方式设置:
1:在java类中
TextView tv = new TextView(this);
tv.setTextColor(Color.RED);
利用这种方式设置字体颜色。
2:在xml文件中
android:id="@+id/email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="邮箱"
android:textColor=""
/>
在你的TextView中有textColor属性,给属性值为RGB格式就行了.
TextView tv = new TextView(this);
tv.setTextColor(Color.RED);
利用这种方式设置字体颜色。
由于你没有自己定义颜色,默认为灰色。