I am building a messaging app in android. I need to show some smiley image when a group of specific character appeared together in a string. Like if Hello friends :p shows in textview, i like to replace :p with some image like smile.png and show this in that textview. How can i show this message with an image in a textview?
Asked
Active
Viewed 356 times
0
-
in textview how will you show image. – Androider Nov 15 '15 at 18:31
1 Answers
0
You can use TextWatcher
private TextWatcher myTW = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
}
};
and then you need to append it to your EditText Note: this is my opinion how it can be solved, maybe there are better solutions

Tano
- 609
- 8
- 23