When a user enters information in an EditText, and moves to the next EditText, the information is highlighted as shown below:
You can achieve what you want by using a BackgroundColorSpan
. You can find more information here:
http://developer.android.com/reference/android/text/style/BackgroundColorSpan.html
To use spans you need to build a SpannableString
which you can do using a SpannableStringBuilder
:
http://developer.android.com/reference/android/text/SpannableStringBuilder.html