Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Syamphu
Posts: 33
Registered: ‎10-29-2010
Accepted Solution

Decode smileys in ActiveRichTexhField

[ Edited ]

how to decode the smiley on ActiveRichTextField?

On API it say :

 

getText

 

Retrieves text string from this field.

If smileys exist in this field, this method first "decodes" them, and then returns the result.

 

is there any function that can be override to decode the smiley? because i have ActiveRichTextField with Emoticon/smileys on it and when im copy the smileys i want it return the smileys/emoticon code in clipboard.

 

emoticon.jpg

 

Please use plain text.
Developer
Syamphu
Posts: 33
Registered: ‎10-29-2010

Re: Decode smileys in ActiveRichTexhField

okay i found the solution by override the selectionCopy and selectionCut and process the object captured

Please use plain text.
New Developer
ajaysinghBB
Posts: 21
Registered: ‎07-26-2012
My Carrier: airtel

Re: Decode smileys in ActiveRichTexhField

How you implemented adding smiley feature?

 

I also want to use this ,where user can input smileys.

Please use plain text.
Developer
Syamphu
Posts: 33
Registered: ‎10-29-2010

Re: Decode smileys in ActiveRichTexhField

well its not very hard work if u realize it, but its seem the ActiveRichTextField is not working well on OS7 if the text is too long (on my experience its 32 characters)

Please use plain text.
New Developer
ajaysinghBB
Posts: 21
Registered: ‎07-26-2012
My Carrier: airtel

Re: Decode smileys in ActiveRichTexhField

can u provide me the snippet of code for the text box field which can take text as well as smileys as input.

 

Thanks in advance.

Please use plain text.
Regular Contributor
kamaleshpandey
Posts: 91
Registered: ‎11-10-2009
My Carrier: Generic

Re: Decode smileys in ActiveRichTexhField

Were you able to navigate through characters after customizing the ActiveRichTexhField ?

Kamalesh
Please use plain text.
Developer
Syamphu
Posts: 33
Registered: ‎10-29-2010

Re: Decode smileys in ActiveRichTexhField

yes i can, i can copy the text too. @ajaysinghBB sorry, my company didnt allowed me to post the code here....
Please use plain text.
New Developer
ajaysinghBB
Posts: 21
Registered: ‎07-26-2012
My Carrier: airtel

Re: Decode smileys in ActiveRichTexhField

Thats ok syamphu, can u just tell me the way you have done.

Please use plain text.
Developer
Syamphu
Posts: 33
Registered: ‎10-29-2010

Re: Decode smileys in ActiveRichTexhField

just use custom font and pass the attribute and offset of the smiley to ActiveRichTextField
Please use plain text.
New Contributor
newDeveloper
Posts: 2
Registered: ‎10-10-2012
My Carrier: bee

Re: Decode smileys in ActiveRichTexhField

I' m also  trying to do a custom emoticon textfield. I looked all over the forums but still didn't get how to create a custom font for them.

 As per my understanding it is necessary to use some not displayable characters so selection will be available on them. And draw a smile icon over this character place. But in this case the character should be the same width with the smile icon and I am not sure i can  find such character.  Did you use the same approach or is there a better way?

Please use plain text.