0 down vote
favorite<http://stackoverflow.com/questions/13029731/having-issue-with-smileys-integration-in-android#>
*1*
In my app i need to integrate commenting functionality which includes
smiley.And i am successfully showing the smiley's in android edit text
box.But i am struck at... after writing the complete comment with smiley's
user will click send.After user clicking the enter i need to send the
comment as a text(need to replace smile with its code as string like ":-)")
. How to convert that smiley image to its respective code. Please any one
help me to get out of this.
And to convert text to smileys i am using the bellow code
ImageGetter imageGetter = new ImageGetter() {
public Drawable getDrawable(String source) {
Drawable d = getResources().getDrawable(
cstlistemoji.images[index]);
d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight());
return d;
}
};
cs = Html.fromHtml(
"<img src='"
+ getResources()
.getDrawable(cstlistemoji.images[index])
+ "'/>", imageGetter, null);
System.out.println("cs is:- " + cs);
edttxtemoji.append(cs);
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en