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
Contributor
handle0088
Posts: 27
Registered: ‎06-28-2011
My Device: 9800
My Carrier: AT&T

How to draw speech bubble?

Hi there,

 

I want to draw speech bubble like SMS native app to show message in my instant message application. I tried example in AdvancedUI but it is not a good solution because all messages are loaded into memory. I just want to load about 10-15 messages to the screen, when user scroll up/down, the old bubbles will be reused.

 

Any one have experience with speech bubble please help!

 

Thanks

Please use plain text.
Contributor
handle0088
Posts: 27
Registered: ‎06-28-2011
My Device: 9800
My Carrier: AT&T

Re: How to draw speech bubble?

any help?
Please use plain text.
Developer
simon_hain
Posts: 16,113
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to draw speech bubble?

well, the UI from advanced UI would be the same, you only have to re-write the logic behind it.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Contributor
handle0088
Posts: 27
Registered: ‎06-28-2011
My Device: 9800
My Carrier: AT&T

Re: How to draw speech bubble?

I am trying the code in Advanced UI but everytime I delete a field from a manager, it will cause the manager scroll (vertical). Is there any way to prevent it scroll when delete a field inside a manager?
Please use plain text.
Developer
peter_strange
Posts: 19,603
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to draw speech bubble?

Moving up to remove the empty space would seem like the right thing for a VerticalFieldManager to do.  If this then causes the scroll to change, then that is possibly just a fact of life. 

 

Can you describe in detail the scenario that causes you this problem.  Where is the Field you are removing in relation t the screen for example?

 

You can find out the current scroll position, and then reset it once you have deleted the Field if you want.  But I think the user would see a 'wobble'. 

Please use plain text.
Contributor
handle0088
Posts: 27
Registered: ‎06-28-2011
My Device: 9800
My Carrier: AT&T

Re: How to draw speech bubble?

Hi,

I need to load data (message, every message is a field) to the speech bubble from database. At a point of time, there is a limited number of message in the UI (ex: 30 msgs) on the top, when user scroll down, I will load more messages to UI and remove the one on the top (one by one).

The problem comes when I try to delete top messages
Please use plain text.