5

I've to develop an android application that allows users to chat I want to make textView that handle their conversations in Balloon as shown in the picture below ,,

can anyone inform me how can I do that ????

thanks in advance

enter image description here

Samiah
  • 221
  • 1
  • 6
  • 17

2 Answers2

4

create two balloon images (for sent and received messages), make them 9 patch and set them as background to a layout which contains conversation.

Adil Soomro
  • 37,609
  • 9
  • 103
  • 153
Buda Gavril
  • 21,409
  • 40
  • 127
  • 196
  • first thanks for answering me, second: create two balloon images (for sent and received messages), I did that , make them 9 patch: can u explain more I'm biginner, and set them as background to an layout which contains conversation : what's the type of the containers should I use ?? – Samiah Apr 09 '12 at 09:12
  • check http://android10.org/index.php/articlesother/279-draw-9-patch-tutorial and http://radleymarx.com/blog/simple-guide-to-9-patch/ tutorials for nine patch. As for containers, use a listView which contains two textViews (for send and received messages) if you want a simple look and put your textViews in a linearLayout. Set your images as background to your linearLayout – Buda Gavril Apr 09 '12 at 09:19
1

You will use 9 Patch images for this.

for showing them, you will use ListView and each row item will contain text and that 9 patch chat bubble background.

Lot of discussion are available:

Community
  • 1
  • 1
Adil Soomro
  • 37,609
  • 9
  • 103
  • 153