Android EditText + set some words in colour
I create EditText boxes dynamically, depending on what is pulled back from the database. Ie. final EditText textV = new EditText(this); textV.setText(monEntry); Is there anyway to set some of the text in the EditText to one colour and another bit to another without using a subString()? Thanks alot if anybody can help! Yes, you can have different colors in different places of the text if you are using SpannableString. Example: SpannableString text = new SpannableString("Lorem ipsum dolor sit amet"); final EditText textV = new EditText(this); // make "Lorem" (characters 0 to 5) red textV.setSpan