android - Append Non-Editable String to EditText -


is there anyway append string edittext value, string appended not editable?

i.e. have edittext email addresses, want treat email address single entity rather single characters. therefore if users deletes last character of email address, want whole email address removed rather last character.

i've been looking @ spannable can't see obvious. similar how gmail , other apps it.

reposting comment answer (and modifying words make suggestion clearer).

have [ontextchanged](http://developer.android.com/reference/android/widget/textview.html#ontextchanged(java.lang.charsequence, int, int, int)) attached edittext notified of user input. can check length of contents of edittext, , if decreases 1, can assume user deleted character.

if user entered me@sample.com on ontextchanged, can set text empty string. of course have checking first make sure user has entered complete email address before applying change. like, maybe make sure user has entered @ character already, or there space after last non-space character.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -