I am trying to create a listview with balloons. Its like a threaded chat list.

I am using thread.9.png (9 patch image) image for balloons. but you can see in the above screen shot that balloons are taking screen width even content is smaller.
I want to resize balloon’s width on the basis of content.
bellow is the code of list view row.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="2dp"
android:background="@drawable/thread">
<TextView
android:text="TextView"
android:id="@+id/messageFrom"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:layout_weight="1.0"
android:layout_width="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginTop="20dip"></TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:id="@+id/messageTitle"
android:text="TextView"
android:layout_gravity="right"
android:layout_marginBottom="20dip"></TextView>
<TextView
android:layout_weight="1.0"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/blue"
android:id="@+id/messageDay"
android:text="TextView" android:layout_marginLeft="20dip"></TextView>
</LinearLayout>
If there is any sample for threaded list view, it will also very helpful.
A 9patch image won’t shrink (will only stretch), so if the thread.9.png’s width is greater than the content size, it’ll use the images width.