I have a string variable 'user' derived from an edittext. I use this variable in a hint with some text. It works well but I need the color of that varibale 'user' inside the hint to be displayed in red. I tried previous answers but they are not helpful as the colour remains unchanged.
final EditText modifyTxt1 = (EditText) findViewById(R.id.editText4);
String user = modifyTxt1.getText().toString().trim();
newTxt.setHint("You have just now created a title : " +user+"");