Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6888797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:04:23+00:00 2026-05-27T06:04:23+00:00

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

  • 0

I am trying to create a listview with balloons. Its like a threaded chat list.
enter image description here

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:04:23+00:00Added an answer on May 27, 2026 at 6:04 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a simple Icon+Text ListView but it does not work.
I am trying to create a custom ListView using an ArrayAdapter . POJO Item
I would like to create a very simple image gallery. I am trying to
I am trying to create an expandable listview similar to the expandable list shown
I'm trying to create a pretty basic chat screen with a ListView displaying the
Hello i am trying to create aplication witch shows me sms in ListView but
I'm trying to create a listview with a static background image (i.e. not contained
I'm trying to create a mobile version of my views using jQuery Mobile, but
i'm trying to create a ListView with a Webview inside, but the app shows
I am trying to create a list using the styles provided by jquery mobile.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.