04-04-2012 09:35 AM
Hello, I am trying to make a chat screen using the BBM SDK. I come up with the below solution:
I want to add the D and R arrows right before the messages, to look exactly like the BBM chat.
How to do it? Please some help here
04-11-2012 07:21 AM
Apologies in the delay of my answer. Was hoping the community could answer the question for you.
The ChatField class by default doesn't allow this behavior. What you will need to do in fact is something like below:
// In your MainScreen Constructor or where you choose to specify declare the below global variables. BasicReplyFieldManager _replyField = new BasicReplyFieldManager(new ReplyField(), new SmileyButton()); VerticalFieldManager _vfm = new VerticalFieldManager(Manager.USE_ALL_WIDTH; BottomUpManager _bscreenManager = new BottomUpManager(); _bscreenManager.add(_vfm); _bscreenManager.add(_replyField); add(_bscreenManager); // In your keyChar method String message = _replyField.getReplyField().getText().trim(); HorizontalFieldManager hfm = new HorizontalFieldManager(NO_HORIZONTAL_SCROLL|NO_HOR
IZONTAL_SCROLLBAR); BitmapField bmp = new BitmapField(_bbm.getUserProfile().getDisplayPictur e(), NON_FOCUSABLE); hfm.add(bmp); hfm.add(new LabelField(message,Field.FOCUSABLE)); _vfm.add(hfm);
The above code just attaches the user's display picture along with the LabelField representing the chat bubble. From using the above logic you can insert your "Read" and "Delivered" status messages. You will also have to program the rules for the status changes yourself.
Let me know if you have questions and I will be more than happy to answer them for you.