In this tutorial it shows how one can set the color of the text (both foreground and background) of the selected part in the EditText or TextView in your Android App. It uses Spannabale string concept to set the color of the selected part of the text. I hope you…