I have a chat app that gives the possibility of adding text to an emoticon.
I have a problem with a I want to be completely smiling, if the user once presses the backspace Here I am using the code: so that you can not force the keyboard to do this - the keyboard is usually But not seeing that kind of information. What you can do is place a TextWatcher on the editing field and afterwards override the text after detecting it and removing the required additional characters. It can be a pain but it's worth it. EditText field, emoticon images are shown, but if I press the backspace button on the normal keyboard, the text I was turning into an emoticons photo By then I have to find and I have to remove many characters till the picture is removed. I am using
Spannable to do this.
/ / This keyclicked listener is in {... smilie = "(angel)"; break; ... int cursor post = content.getSelectionStart (); Content.getText () Insert (cursor position, get supported text (this, smileys)); Content.getText () Insert (cursor mode + smilie.length (), ""); } Public stable boolean addSmiles (Reference Reference, Spannable Spannable) {Boolean hasChanges = false; (Entry
No comments:
Post a Comment