I want to be able to add a text-messaging balloon every time the user revives data from a HttpGet, I want it so that it looks nearly identical to the default Android text messaging UI. I’m fine with all the code, I just need a way to create the UI and create another text balloon every time data comes back from a HttpGet request.
Thanks ever so much, for the answering this questions and I’m sure there’s an easy way to do it, yet I’ve found no way by using the ‘ole Google.
I am doing something similar for my app am doing the following to achieve it:
android:background)So far, this will give you identical bubbles as background for all messages.
If you want to get fancy, you can create different bubbles for participants, and use the
setBackgroundResourcemethod in your Adapter to set the correct background.Further, if you wish to align them left or right, like in the message app, you will need to add spacers to the left and right of your TextView in the layout file. I used FrameLayouts with a fixed width. Make sure to set their visibility to
GONE.As with swapping the different bubble colors, just set the visibility of the left/right spacer.