Search code examples
javaandroidstringunderlinecharsequence

Remove underline from a string in Java/Android


I'm getting text input from an editText and setting it as a notification .setTitle, but when it shows in the notification, it shows up with an underline on certain words. I had no idea why, but when I went to test it, the android keyboard puts underlines under words it has auto completed. So, what would be the best method to remove this?


Solution

  • Use :

    getText().toString() 
    

    as described here