views:

112

answers:

1

I need to show a Label with emoticons included already in the blackbery interface, with flags, etc.

+1  A: 

There is no such built-in functionality.

With net available you can use BrowserField or WebBitmapField.

Otherwise you can use local resources + BitmapField. I wouldn't advice to use LabelField with custom drawing, just add simple LabelField before or after BitmapField with emoicon.

Max Gontar
sorry i can not give you karma.... i only have 11 on my reputation and i need 15 :)
timoto
thats OK, you can always came again ;) !
Max Gontar
The solution won't work if the emoticon is in the middle of the text... in which case Timoto will need to derive a custom LabelField
ADB
it's obvious you'll have to split text into 2 LabelFields, which will be better for layout, more simple and bugfree
Max Gontar
I have the same requirement as timoto. The LabelField/BitmapField/LabelField mechanism also has shortcomings when it comes to word wrap. I solved this by tokenizing the text into words, and then using a FlowFieldManager to put words and images together in a paragraph-like view. However, this is slow, doesn't work for right-to-left languages, and also doesn't work for text input. It's pretty much a hack, whereas overriding the paint and layout methods of TextField would do everything nicely and efficiently - unfortunately it is not possible to do that.
Michael Donohue
@Michael it shouldn't be so slow if you split text only in two cases: when image should be placed and on newline. using TextEditField gives you text input. Sure there will be other issues, but they can be solved too. I am agree that overriding paint and layout would be a best solution, but it's so buggy!
Max Gontar