How to set text color in the edit text or text view widget in your Android App?

preview_player
Показать описание
This short video shows how one can use setTextColor option to set the color of the text either in the edit text (plain text) of textview widget of the Android App.

Complete source code and other details of this video are posted in the below link:

However, the main Java code is copied below also for reference:

public class MainActivity extends AppCompatActivity {
private EditText editText;
private TextView textView;

@Override
protected void onCreate(Bundle savedInstanceState) {

}

public void buttonEditTextColor(View view){
}

public void buttonTextViewColor(View view){
}
}

-
Рекомендации по теме
Комментарии
Автор

Hello. I'm getting an error like" cannot find symbols variable " when I enter the keyword Color.BLUE. Might you please give me clarity on how to solve this particular issue?. thank you.

fabricecaphane
welcome to shbcf.ru